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

Find shadowed packages #62

Merged
merged 2 commits into from
Feb 17, 2023
Merged

Find shadowed packages #62

merged 2 commits into from
Feb 17, 2023

Conversation

Enchufa2
Copy link
Member

@Enchufa2 Enchufa2 commented Feb 16, 2023

Here's my version, closes #58. I opted for one package per line, and the idea is that Package in LibPath is shadowed by the one in Shadow.LibPath, which has higher priority (the one that casts its shadow). Shadow.Newer is TRUE when the Shadow.Version is newer (and therefore shadowing would be acceptable). @eddelbuettel @MatthieuStigler Comments welcome.

Sample output:

bspm::shadowed_packages()
#>               Package              LibPath  Version           Shadow.LibPath Shadow.Version Shadow.Newer
#> base64enc   base64enc /usr/lib64/R/library    0.1.3 /usr/local/lib/R/library          0.1.3        FALSE
#> boot             boot /usr/lib64/R/library   1.3.28 /usr/local/lib/R/library       1.3.28.1         TRUE
#> cachem         cachem /usr/lib64/R/library    1.0.6 /usr/local/lib/R/library          1.0.6        FALSE
#> class           class /usr/lib64/R/library   7.3.20 /usr/local/lib/R/library         7.3.21         TRUE
#> cluster       cluster /usr/lib64/R/library    2.1.4 /usr/local/lib/R/library          2.1.4        FALSE
#> codetools   codetools /usr/lib64/R/library   0.2.18 /usr/local/lib/R/library         0.2.18        FALSE
#> digest         digest /usr/lib64/R/library   0.6.29 /usr/local/lib/R/library         0.6.31         TRUE
#> fastmap       fastmap /usr/lib64/R/library    1.1.0 /usr/local/lib/R/library          1.1.0        FALSE
#> foreign       foreign /usr/lib64/R/library   0.8.83 /usr/local/lib/R/library         0.8.84         TRUE

@eddelbuettel
Copy link
Contributor

I'll try to take a look later. I agree that one these could and should be in bspm and I also thought about the 'long-to-wide' transformation you did here.

@Enchufa2
Copy link
Member Author

Merging here. We can revisit later if we find any sharp edge.

@Enchufa2 Enchufa2 merged commit 44ef463 into master Feb 17, 2023
@Enchufa2 Enchufa2 deleted the feature/shadow branch February 17, 2023 22:15
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.

Detect and report package shadowing
2 participants