question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Binary imcompatibility between 3.7.0 and 3.7.1

See original GitHub issue

Hello,

It seems that better-files versions of 3.7.0 and 3.7.1 are binary imcompatible.

This is manifested when using mixed version of better-files in project (one is pulling 3.7.0 and other 3.7.1):

java.lang.NoSuchMethodError: 
better.files.File.glob$default$3(Ljava/lang/String;Z)Lbetter/files/File$PathMatcherSyntax;

This seems to be caused by PR #290 which added new argument to the glob.

Could it be possible to release 3.7.2 without #290 and 3.8.0 with #290. If this this is too much trouble, then it might be good to add note to the release notes.

I also reviewed the PR and didn’t notice this - c’est la vie.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
pathikritcommented, May 9, 2019

v3.8.0 is released and should mitigate this

2reactions
avdvcommented, Mar 28, 2019

better files considers it a minor version bump if extra default parameters are added (I know it can still break curried usages but in most other cases your code will just still work)

That’s not true. This breaks binary API compatibility in any case. You changed a 2-arity function into a 3-arity one (minus the implicit arg). Once compiled, the JVM wants to call either an 2-arity or 3-arity function.

The default argument only makes it source compatible in regard to the older version since default arguments are handled by the compiler. So you have to recompile your code if you switch from 3.7.0 to 3.7.1.

If you use one library compiled with 3.7.0 and another compiled with 3.7.1 you’re in trouble.

To keep binary compatibility you could overload the method instead, without a default argument:

  def globRegex(
      pattern: Regex,
      includePath: Boolean = true
    )(implicit
      visitOptions: File.VisitOptions = File.VisitOptions.default
    ): Iterator[File] = globRegex(pattern, Int.MaxValue, includePath)

  def globRegex(
      pattern: Regex,
      maxDepth: Int,
      includePath: Boolean = true
    )(implicit
      visitOptions: File.VisitOptions = File.VisitOptions.default
    ): Iterator[File] = ...
Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues - GitHub
Binary compatibility issues on Python 3.7/Linux · Issue #1260 · gevent/gevent · GitHub.
Read more >
Upgrading your Application to Ice 3.7.1 from Ice 3.7.0 - Release Index
Ice 3.7.1 maintains full source and binary compatibility with Ice 3.7.0: you can upgrade your application from Ice 3.7.0 to Ice 3.7.1 without...
Read more >
What's New In Python 3.7 — Python 3.11.1 documentation
On Windows, a new API call tells Windows that tk scales for DPI. On Windows 8.1+ or 10, with DPI compatibility properties of...
Read more >
PyPy v7.3.7: bug-fix release of 3.7, 3.8 - PyPy documentation
We mistakenly added fields to PyFrameObject and PyDateTime_CAPI that broke the promise of binary compatibility, which means that c-extension wheels compiled for ...
Read more >
What numpy version is compatible with Python 3.7?
... Mission Analysis Tool, GMAT 2020a python version is constrained to Python 3.7 due to a binary dependency in GMAT libPythonInterface.dll.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found