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

Explicitly import ArrayLayouts.MemoryLayout #366

Merged
merged 2 commits into from
Feb 15, 2025
Merged

Conversation

nsajko
Copy link
Contributor

@nsajko nsajko commented Feb 14, 2025

Prevent name ambiguity, adapt to changes in nightly Julia, preventing a
warning during precompilation.

See:
* JuliaLang/julia#25744
* JuliaLang/julia#57290
* JuliaLang/julia#57311
Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.72%. Comparing base (2a479a4) to head (349cb53).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #366   +/-   ##
=======================================
  Coverage   95.72%   95.72%           
=======================================
  Files          17       17           
  Lines        3205     3205           
=======================================
  Hits         3068     3068           
  Misses        137      137           

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

@nsajko
Copy link
Contributor Author

nsajko commented Feb 14, 2025

This is the mentioned warning:

julia> using LazyArrays
Info Given LazyArrays was explicitly requested, output will be shown live 
WARNING: Constructor for type "MemoryLayout" was extended in `LazyArrays` without explicit qualification or import.
  NOTE: Assumed "MemoryLayout" refers to `ArrayLayouts.MemoryLayout`. This behavior is deprecated and may differ in future versions.`
  NOTE: This behavior may have differed in Julia versions prior to 1.12.
  Hint: If you intended to create a new generic function of the same name, use `function MemoryLayout end`.
  Hint: To silence the warning, qualify `MemoryLayout` as `ArrayLayouts.MemoryLayout` or explicitly `import ArrayLayouts: MemoryLayout`
Precompiling LazyArrays finished.
  6 dependencies successfully precompiled in 20 seconds. 3 already precompiled.
  1 dependency had output during precompilation:
┌ LazyArrays
│  [Output was shown above]
└

@dlfivefifty
Copy link
Member

I'm completely confused... I thought we already needed to explicitly import MemoryLayout to overload??

But I see we aren't doing this...

src/LazyArrays.jl Outdated Show resolved Hide resolved
@dlfivefifty dlfivefifty merged commit f47da84 into JuliaArrays:master Feb 15, 2025
16 checks passed
@nsajko nsajko deleted the b branch February 15, 2025 11:56
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.

2 participants