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

Use @static check to simplify get_loaded_modules #80

Merged

Conversation

giordano
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Jan 28, 2022

Codecov Report

Merging #80 (d077ba2) into main (9023307) will increase coverage by 0.45%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #80      +/-   ##
==========================================
+ Coverage   79.12%   79.57%   +0.45%     
==========================================
  Files           6        6              
  Lines         570      568       -2     
==========================================
+ Hits          451      452       +1     
+ Misses        119      116       -3     
Impacted Files Coverage Δ
src/utils.jl 70.93% <100.00%> (+2.74%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9023307...d077ba2. Read the comment docs.

@giordano
Copy link
Member Author

Incidentally, the static check makes the function type-stable because we return Vector{Vector{SubString{String}}} on Linux and Vector{Vector{String}} elsewhere.

@giordano giordano force-pushed the mg/get-loaded-modules branch 2 times, most recently from b4a7aa0 to 5e22632 Compare January 29, 2022 00:18
@giordano
Copy link
Member Author

Bump 🙂

@giordano giordano force-pushed the mg/get-loaded-modules branch from 5e22632 to d077ba2 Compare March 15, 2022 23:45
return Vector{String}[]
end

!isfile("/proc/modules") && return Vector{SubString{String}}[]
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like one path returns Vector{String}[] and the other returns Vector{SubString{String}}[]. I think we can just safely return Vector{String}[] in both cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

@staticfloat staticfloat merged commit 9236bfa into JuliaContainerization:main Mar 16, 2022
@giordano giordano deleted the mg/get-loaded-modules branch March 16, 2022 01:01
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