Skip to content
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

ENH: no output in editable verbose mode when there is no work to do #594

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

dnicolodi
Copy link
Member

No description provided.

@lesteve
Copy link
Contributor

lesteve commented Mar 6, 2024

I had a quick look and it looks good, thanks for this!

I had some small changes on top of #579 but it looks like your changes are simpler.

@dnicolodi
Copy link
Member Author

I extended the tests further and improved the log message. I think logging the package name instead of the top level module names is much better. It requires passing one more argument to the loader instance, but I don't see any draw back in doing so.

Copy link

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From an end user point of view, the feedback looks good:

$ touch sklearn/ensemble/_gradient_boosting.pyx

$ python -c "import sklearn"
meson-python: building scikit-learn: /Users/ogrisel/miniforge3/envs/dev/bin/ninja
[3/3] Linking target sklearn/ensemble/_gradient_boosting.cpython-311-darwin.so

$ python -c "import sklearn"  # no output when no work to do

Thanks very much for getting this through.

@dnicolodi dnicolodi requested a review from rgommers March 6, 2024 16:27
@lesteve
Copy link
Contributor

lesteve commented Mar 18, 2024

This one seems ready to be merged, cc @rgommers. Let me know is someone else is likely to review!

Once this PR is merged it would be great if a release of meson-python could be made. There is not a huge rush, but together with #569 this would make it easier for scikit-learn to transition to Meson as our main build backend, see scikit-learn/scikit-learn#28506 for more details.

@dnicolodi
Copy link
Member Author

The unwritten policy is that "significant" PRs by project maintainers need review by another maintainer. I suspect @rgommers is very busy with the upcoming NumPy 2.0 release. This is not a critical bug fix (from our point of view, at least), thus you'll need to be patient for a bit longer 🙂

@lesteve
Copy link
Contributor

lesteve commented Mar 18, 2024

Thanks for your answer, and indeed I completely understand that people have other priorities (I should have been more explicit about this in my previous message) !

@dnicolodi
Copy link
Member Author

@rgommers After thinking a bit more abut it, I'll be merging this PR before releasing 0.16.0. Unless you object, I'll be doing this before the end of the week.

Copy link
Contributor

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, sorry for the long delay @dnicolodi & all. I have actually been using this PR for a while and everything seems to work like a charm. I had one pending review comment regarding line length, but that is certainly non-blocking and will likely be fine as is. So let's get this in.

Thanks again everyone!

# We want to show some output only if there is some work to do
if self._work_to_do(env):
build_command = ' '.join(self._build_cmd)
print(f'meson-python: building {self._name}: {build_command}', flush=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that this line can get very long, with a longer package name plus a long absolute path. I think it's fine though; the absolute path is the least important part here. Only with something like Nix which has hashes in the path this may look a bit off. But let's leave it as is for now and see if anyone notices.

@rgommers rgommers merged commit 4cf51a2 into mesonbuild:main Apr 17, 2024
39 checks passed
@dnicolodi dnicolodi mentioned this pull request Apr 17, 2024
@lesteve
Copy link
Contributor

lesteve commented Apr 17, 2024

Great to see this one merged, thanks 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants