-
Notifications
You must be signed in to change notification settings - Fork 68
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
mesonpy: include uncommited changes in sdist #58
Conversation
@rgommers can you have a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to work. It now builds an sdist rather than error out, and shows this warning:
WARNING: Repository has uncommitted changes that will not be included in the dist tarball
However, the uncommitted changes are not actually included in the sdist - and including desired changes was the goal here.
Ah, sorry, I misread the Meson commit. Then it is non-trivial to implement this, I will have a look later. |
scipy/scipy#16187 (comment) points to the Flit code for this. Flit does seem to have the behavior we want: do not include files that are not tracked, but do include uncommitted changes to tracked files. The code in Flit to do this is quite concise. Seems like a good option to just copy that. |
Yeah, Meson doesn't include any prepackaged support for doing this. :( Any way you slice it, Previous versions of Meson actually warned you on uncommitted changes, because those changes would not be disted. The most recent release outright errors, and offers a flag to restore the 0.61.0 behavior of merely warning you that those changes won't be included. The logic behind the change is that it was easy to not notice the warning, so we changed the emphasis of the warning itself. The flit approach is pretty good if your goal is to include uncommitted changes. It does mean that you'll no longer get some things that git-archive does, such as gitattributes |
@rgommers can you give this a try before merging just to confirm it indeed works as expected for SciPy? Thanks! |
92518cd
to
1f4e0d7
Compare
Fixes #53 Signed-off-by: Filipe Laíns <[email protected]>
Thanks @FFY00, this appears to work. At least I tested editing a One small thing to improve perhaps, this warning may be confusing: + meson dist --allow-dirty --no-tests --formats gztar
WARNING: Repository has uncommitted changes that will not be included in the dist tarball
Created /home/rgommers/code/scipy/.mesonpy-dqpt326g/build/meson-dist/SciPy-1.9.0.dev0.tar.gz
Successfully built scipy-1.9.0.dev0.tar.gz How about logging right above it something like " Whether |
That makes sense, but we are currently not able to detect this, and it would probably require some work to do so. I will push a 0.5.0 with this PR as-is for now and then revisit this. |
This dependency was bumped from 0.60.0 to 0.62.0 in mesonbuildgh-58, but only in one of the two places where it was needed. These two places should probably always be kept consistent with each other, even though technically it's not _required_.
This dependency was bumped from 0.60.0 to 0.62.0 in gh-58, but only in one of the two places where it was needed. These two places should probably always be kept consistent with each other, even though technically it's not _required_.
This dependency was bumped from 0.60.0 to 0.62.0 in gh-58, but only in one of the two places where it was needed. These two places should probably always be kept consistent with each other, even though technically it's not _required_. Signed-off-by: Filipe Laíns <[email protected]>
Including uncommitted changes in the sdist was implemented in mesonbuild#58 after the discussion in mesonbuild#53. However, the current behavior for which uncommitted changes to files under version control are included but not other files, is an hard to justify surprising half measure. After careful analysis, it has been determined that none of the use cases for this feature is still valid. Removing it makes the implementation easier, and the behavior less surprising and easier to document an explain.
Including uncommitted changes in the sdist was implemented in mesonbuild#58 after the discussion in mesonbuild#53. However, the current behavior for which uncommitted changes to files under version control are included but not other files, is an hard to justify surprising half measure. After careful analysis, it has been determined that none of the use cases for this feature is still valid. Removing it makes the implementation easier, and the behavior less surprising and easier to document an explain. While at it, modernize the associated test.
Including uncommitted changes in the sdist was implemented in mesonbuild#58 after the discussion in mesonbuild#53. However, the current behavior for which uncommitted changes to files under version control are included but not other files, is a hard to justify surprising half measure. After careful analysis, it has been determined that none of the use cases for this feature is still valid. Removing it makes the implementation easier, and the behavior less surprising and easier to document and explain. While at it, modernize the associated test.
Including uncommitted changes in the sdist was implemented in mesonbuild#58 after the discussion in mesonbuild#53. However, the current behavior for which uncommitted changes to files under version control are included but not other files, is a hard to justify surprising half measure. After careful analysis, it has been determined that none of the use cases for this feature is still valid. Removing it makes the implementation easier, and the behavior less surprising and easier to document and explain. While at it, modernize the associated test.
Including uncommitted changes in the sdist was implemented in mesonbuild#58 after the discussion in mesonbuild#53. However, the current behavior for which uncommitted changes to files under version control are included but not other files, is a hard to justify surprising half measure. After careful analysis, it has been determined that none of the use cases for this feature is still valid. Removing it makes the implementation easier, and the behavior less surprising and easier to document and explain. While at it, modernize the associated test.
Including uncommitted changes in the sdist was implemented in mesonbuild#58 after the discussion in mesonbuild#53. However, the current behavior for which uncommitted changes to files under version control are included but not other files, is a hard to justify surprising half measure. After careful analysis, it has been determined that none of the use cases for this feature is still valid. Removing it makes the implementation easier, and the behavior less surprising and easier to document and explain. While at it, modernize the associated test.
Including uncommitted changes in the sdist was implemented in mesonbuild#58 after the discussion in mesonbuild#53. However, the current behavior for which uncommitted changes to files under version control are included but not other files, is a hard to justify surprising half measure. After careful analysis, it has been determined that none of the use cases for this feature is still valid. Removing it makes the implementation easier, and the behavior less surprising and easier to document and explain. While at it, modernize the associated test.
Including uncommitted changes in the sdist was implemented in #58 after the discussion in #53. However, the current behavior for which uncommitted changes to files under version control are included but not other files, is a hard to justify surprising half measure. After careful analysis, it has been determined that none of the use cases for this feature is still valid. Removing it makes the implementation easier, and the behavior less surprising and easier to document and explain. While at it, modernize the associated test.
Fixes #53
Signed-off-by: Filipe Laíns [email protected]