-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] + in version string breaks fingerprint system #995
Comments
Thanks @anders-kiaer @Marc-Andre-Rivet we could go for full symmetry with cache_regex = re.compile(r"^v[\w-]+m[0-9a-fA-F]+$") # unchanged
version_clean = re.compile(r"[^\w-]")
def build_fingerprint(path, version, hash_value):
path_parts = path.split("/")
filename, extension = path_parts[-1].split(".", 1)
return "{}.v{}m{}.{}".format(
"/".join(path_parts[:-1] + [filename]),
re.sub(version_clean, "_", str(version)),
hash_value,
extension,
) unless you can think of a scenario where we end up with matching cleaned strings for different versions... then I guess we'd need to somehow escape these chars rather than just setting them all to |
The metadata should be the last of them.. major.minor.patch: https://semver.org/#spec-item-2 @alexcjohnson 👍 for the suggested change above. In theory it would be possible to generate the same result string by appending the metadata to the pre-release string with The paranoid version becomes:
which is what I'm going for. Will also need to update https://github.com/plotly/dash/blob/dev/@plotly/webpack-dash-dynamic-import/src/index.js#L8 - neither the DataTable or DCC use metadata in their release versions, so only the plugin needs to have a patch release. We can update usage across the board in the next minor. |
Describe your context
pip list | grep dash
belowDescribe the bug
When going from
dash==1.4
todash==1.5
, we experienced a breaking change in the custom Dash components we use.It took some hours to debug, but the reason was found to be related to the new "fingerprint" system in Dash. In our project, we use the setuptools_scm package (by the Python Packaging Authority) in order to have a versioning system that automatically is linked to the git repo tags. This makes continuous deployment to e.g. Pypi easy and robust wrt. keeping versions consistent.
I.e. instead of
in the component package, we use something like
This worked until
dash==1.5
, then it broke on non-release-versions due to automatic tags of the type1.0.0.dev5+af4304c.d20191103
, where the tag includes a+
. See the default tag formats.Changing the line above to
is one workaround that gets the third party components to also work on
dash==1.5
Expected behavior
setuptools_scm
provided versions to work also indash>=1.5
.Suggested solution
Change this line in Dash's
build_fingerprint
to also replace+
with_
?The text was updated successfully, but these errors were encountered: