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

Add a watcher mechanism to detect when Distributed might be in use #10

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

JamesWrigley
Copy link
Collaborator

@JamesWrigley JamesWrigley commented Nov 26, 2024

This should help users figure out if one of their packages is using Distributed and another is using DistributedNext.

@JamesWrigley JamesWrigley self-assigned this Nov 26, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.06%. Comparing base (c68111a) to head (fe0e79a).
Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #10      +/-   ##
==========================================
+ Coverage   87.83%   88.06%   +0.23%     
==========================================
  Files          11       11              
  Lines        2055     2070      +15     
==========================================
+ Hits         1805     1823      +18     
+ Misses        250      247       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JamesWrigley JamesWrigley force-pushed the distributed-warning branch 2 times, most recently from d1f5989 to 1aefe05 Compare December 3, 2024 12:49
Copy link
Member

@jpsamaroo jpsamaroo left a comment

Choose a reason for hiding this comment

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

Nice! This should reduce any user confusion when libraries start using DistributedNext.

@test isempty(stderr_str)

# Only one of the two being active should also do nothing
cmd = `$test_exename $test_exeflags -e 'using Distributed, DistributedNext; Distributed.init_multi(); @assert !DistributedNext._check_distributed_active()'`
Copy link
Member

Choose a reason for hiding this comment

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

Should we also test the other combination (DistributedNext.init_multi() only)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah we might as well, added a test for it in fe0e79a (also took the liberty of cleaning up the test a bit).

This should help users figure out if one of their packages is using Distributed and
another is using DistributedNext.
@JamesWrigley JamesWrigley merged commit 135f5bd into master Dec 3, 2024
14 checks passed
@JamesWrigley JamesWrigley deleted the distributed-warning branch December 3, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants