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

allow filtering out stdlibs and jlls #40

Merged
merged 2 commits into from
Dec 30, 2022
Merged

Conversation

KristofferC
Copy link
Contributor

Without this, large packages become a bit too messy to understand.

For example Plots, without filtering:

image

with filtering:

image

@tfiers
Copy link
Owner

tfiers commented Dec 30, 2022

Awesome. If you have the time, could you add a test and a line to the changelog?

@KristofferC
Copy link
Contributor Author

Added a test and a changelog entry. I wonder if these should default to true? I think it is quite rare you are interested in the stdlib and jll part of the graph.

@tfiers
Copy link
Owner

tfiers commented Dec 30, 2022

Thanks!
Part of the reason I made this package was cause the existing package (PkgDependency.jl) didn't show those.

But indeed, for some users this might be a good default.
Maybe with Preferences.jl

@KristofferC
Copy link
Contributor Author

Part of the reason I made this package was cause the existing package (PkgDependency.jl) didn't show those.

It seems to show them now:

julia> PkgDependency.tree("PkgDependency")
 PkgDependency v0.4.0                                               
━━━━━━━━━━━━━━━━━━━━━━                                              
          │                                                         
          ├── Pkg v1.8.0                                            
          │   ├── Downloads v1.6.0                                  
          │   │   ├── LibCURL v0.6.3                                
          │   │   │   ├── MozillaCACerts_jll v2022.10.11            
          │   │   │   └── LibCURL_jll v7.84.0+0                     
          │   │   │       ├── LibSSH2_jll v1.10.2+0                 
          │   │   │       │   └── MbedTLS_jll v2.28.0+0             
          │   │   │       ├── MbedTLS_jll v2.28.0+0 (*)             
          │   │   │       ├── nghttp2_jll v1.48.0+0                 
          │   │   │       └── Zlib_jll v1.2.13+0                    
          │   │   ├── NetworkOptions v1.2.0                         
          │   │   └── ArgTools v1.1.1                               
          │   ├── Tar v1.10.0                                       
          │   │   ├── SHA v0.7.0                                    
          │   │   └── ArgTools v1.1.1 (*)                           
          │   ├── SHA v0.7.0 (*)                                    
          │   ├── p7zip_jll v17.4.0+0                               
          │   └── TOML v1.0.3                                       
          ├── Term v1.1.0                                           
          │   ├── ProgressLogging v0.1.4                            
          │   │   └── SHA v0.7.0 (*)                                
          │   ├── WordTokenizers v0.5.6                             
          │   │   ├── DataDeps v0.7.10                              
          │   │   │   ├── HTTP v1.6.2                               
          │   │   │   │   ├── URIs v1.4.1                           
          │   │   │   │   ├── IniFile v0.5.1                        
          │   │   │   │   ├── LoggingExtras v1.0.0                  
          │   │   │   │   ├── CodecZlib v0.7.0                      
          │   │   │   │   │   ├── Zlib_jll v1.2.13+0 (*)            
          │   │   │   │   │   └── TranscodingStreams v0.9.10        
          │   │   │   │   ├── MbedTLS v1.1.7                        
          │   │   │   │   │   ├── MbedTLS_jll v2.28.0+0 (*)         
          │   │   │   │   │   └── MozillaCACerts_jll v2022.10.11 (*)
          │   │   │   │   ├── OpenSSL v1.3.2                        
          │   │   │   │   │   ├── MozillaCACerts_jll v2022.10.11 (*)
          │   │   │   │   │   ├── OpenSSL_jll v1.1.19+0             
          │   │   │   │   │   │   ├── JLLWrappers v1.4.1            
          │   │   │   │   │   │   │   └── Preferences v1.3.0        
          │   │   │   │   │   │   │       └── TOML v1.0.3 (*)       
          │   │   │   │   │   │   └── Pkg v1.8.0 (*)                
          │   │   │   │   │   └── BitFlags v0.1.7                   
          │   │   │   │   ├── NetworkOptions v1.2.0 (*)             
          │   │   │   │   └── SimpleBufferStream v1.1.0             
          │   │   │   ├── SHA v0.7.0 (*)                            
          │   │   │   ├── p7zip_jll v17.4.0+0 (*)                   
          │   │   │   └── Reexport v1.2.2                           
          │   │   ├── HTML_Entities v1.0.1                          
          │   │   │   └── StrTables v1.0.1                          
          │   │   └── StrTables v1.0.1 (*)                          
          │   ├── CodeTracking v1.2.0                               
          │   ├── OrderedCollections v1.4.1                         
          │   ├── SnoopPrecompile v1.0.1                            
          │   ├── MyterialColors v0.3.0                             
          │   ├── Tables v1.10.0                                    
          │   │   ├── DataAPI v1.14.0                               
          │   │   ├── OrderedCollections v1.4.1 (*)                 
          │   │   ├── IteratorInterfaceExtensions v1.0.0            
          │   │   ├── DataValueInterfaces v1.0.0                    
          │   │   └── TableTraits v1.0.1                            
          │   │       └── IteratorInterfaceExtensions v1.0.0 (*)    
          │   ├── UnicodeFun v0.4.1                                 
          │   ├── Parameters v0.12.3                                
          │   │   ├── OrderedCollections v1.4.1 (*)                 
          │   │   └── UnPack v1.0.2                                 
          │   └── Highlights v0.5.2                                 
          │       └── DocStringExtensions v0.9.3                    
          └── OrderedCollections v1.4.1 (*)                         

@tfiers tfiers merged commit 86f9e2b into tfiers:main Dec 30, 2022
@KristofferC KristofferC deleted the kc/stdlib_jll branch December 30, 2022 11:26
@tfiers
Copy link
Owner

tfiers commented Dec 30, 2022

Maybe a :auto default would be good, where it chooses whether or not to display jll's/ stdlib based on some heuristic.

(A heuristic that avoids that eldritch horror graph of all Plots deps)

@tfiers
Copy link
Owner

tfiers commented Dec 30, 2022

Or thinking further, allowing the user to specify custom filters, that can make use of PkgGraphs-provided functions like is_stdlib, is_jll

@tfiers
Copy link
Owner

tfiers commented Jan 2, 2023

@KristofferC I refactored your code a bit; added an Options object so I didn't have to keep repeating myself in docstrings.
Also renamed the package (back to what it was earlier, re JuliaRegistries/General#74889); so you might need to change a git remote

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