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

feat: Add ruff package #77

Merged
merged 4 commits into from
Jul 23, 2024
Merged

Conversation

jaudiger
Copy link
Contributor

Add ruff tool. Based on @kylewlacy's comment brioche-dev/brioche#103 (comment).

Tested with:

bash-5.2$ brioche install -p packages/ruff     
[17205]    Compiling ruff_linter v0.5.3 (/home/brioche-runner-d5be76f5f48436b982fa26da047d369eb7ce00bff
eb3f7ee9ed26c61c43572c8/work/crates/ruff_linter)                                                       
[17205]    Compiling clap_complete_command v0.6.1                                                      
[17205]    Compiling cachedir v0.3.1                                                                   
[17205]    Compiling bincode v1.3.3                                                                    
[17205]    Compiling wild v2.2.1                                                                       
[17205]    Compiling ruff_workspace v0.0.0 (/home/brioche-runner-d5be76f5f48436b982fa26da047d369eb7ce00
bffeb3f7ee9ed26c61c43572c8/work/crates/ruff_workspace)                                                 
[17205]    Compiling ruff_server v0.2.2 (/home/brioche-runner-d5be76f5f48436b982fa26da047d369eb7ce00bff
eb3f7ee9ed26c61c43572c8/work/crates/ruff_server)                                                       
[17205]    Compiling tikv-jemallocator v0.6.0                                                          
[17205]     Finished `release` profile [optimized] target(s) in 7m 54s                                 
[17205]   Installing /home/brioche-runner-d5be76f5f48436b982fa26da047d369eb7ce00bffeb3f7ee9ed26c61c4357
2c8/.local/share/brioche/outputs/output-d5be76f5f48436b982fa26da047d369eb7ce00bffeb3f7ee9ed26c61c43572c
8/bin/ruff                                                                                             
[17205]    Installed package `ruff v0.5.3 (/home/brioche-runner-d5be76f5f48436b982fa26da047d369eb7ce00b
ffeb3f7ee9ed26c61c43572c8/work/crates/ruff)` (executable `ruff`)                                       
                                                                                                       
Process 17205 [7:55.1 Exited 0]
Process 17167 [17.92s Exited 0]
Process 17165 [173.1ms Exited 0]
Build finished, completed 5 jobs in 9:18.8
Writing output
Wrote output to /home/container/.local/share/brioche/installed



bash-5.2$ ruff --version
ruff 0.5.3

Signed-off-by: jaudiger <jeremy.audiger@ioterop.com>
Co-authored-by: Kyle Lacy <kylewlacy@users.noreply.github.com>
Copy link
Member

@kylewlacy kylewlacy left a comment

Choose a reason for hiding this comment

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

LGTM

@kylewlacy kylewlacy enabled auto-merge (squash) July 23, 2024 08:20
@kylewlacy kylewlacy disabled auto-merge July 23, 2024 08:32
@kylewlacy
Copy link
Member

Ah, looks like there will need to be an extra .toDirectory() method added to the std.process(...) call

Signed-off-by: jaudiger <jeremy.audiger@ioterop.com>
…es into add-ruff-package

Signed-off-by: jaudiger <jeremy.audiger@ioterop.com>
@jaudiger
Copy link
Contributor Author

Woah, I'm surprised how I tested it successfully (see PR's description). Nevertheless, I did the modification and here we go for the output:

bash-5.2$ brioche install -p packages/ruff
[179]    Compiling jod-thread v0.1.2                                                                                                                                                              
[179]    Compiling argfile v0.2.0                                                                                                                                                                 
[179]    Compiling notify v6.1.1                                                                                                                                                                  
[179]    Compiling clearscreen v3.0.0                                                                                                                                                             
[179]    Compiling rayon v1.10.0                                                                                                                                                                  
[179]    Compiling clap_complete_command v0.6.1                                                                                                                                                   
[179]    Compiling cachedir v0.3.1                                                                                                                                                                
[179]    Compiling ruff_linter v0.5.3 (/home/brioche-runner-d5be76f5f48436b982fa26da047d369eb7ce00bffeb3f7ee9ed26c61c43572c8/work/crates/ruff_linter)                                             
[179]    Compiling bincode v1.3.3                                                                                                                                                                 
[179]    Compiling wild v2.2.1                                                                                                                                                                    
[179]    Compiling ruff_workspace v0.0.0 (/home/brioche-runner-d5be76f5f48436b982fa26da047d369eb7ce00bffeb3f7ee9ed26c61c43572c8/work/crates/ruff_workspace)                                       
[179]    Compiling ruff_server v0.2.2 (/home/brioche-runner-d5be76f5f48436b982fa26da047d369eb7ce00bffeb3f7ee9ed26c61c43572c8/work/crates/ruff_server)                                             
[179]    Compiling tikv-jemallocator v0.6.0                                                                                                                                                       
[179]     Finished `release` profile [optimized] target(s) in 7m 39s                                                                                                                              
[179]   Installing /home/brioche-runner-d5be76f5f48436b982fa26da047d369eb7ce00bffeb3f7ee9ed26c61c43572c8/.local/share/brioche/outputs/output-d5be76f5f48436b982fa26da047d369eb7ce00bffeb3f7ee9ed26
c61c43572c8/bin/ruff                                                                                                                                                                              
[179]    Installed package `ruff v0.5.3 (/home/brioche-runner-d5be76f5f48436b982fa26da047d369eb7ce00bffeb3f7ee9ed26c61c43572c8/work/crates/ruff)` (executable `ruff`)                             
                                                                                                                                                                                                  
Process 179 [7:39.4 Exited 0]
Process 129 [12.39s Exited 0]
Process 123 [164.7ms Exited 0]
Build finished, completed 6 jobs in 8:56.9
Writing output
Wrote output to /home/container/.local/share/brioche/installed
bash-5.2$ ruff --version
ruff 0.5.3

@kylewlacy
Copy link
Member

Woah, I'm surprised how I tested it successfully (see PR's description)

Typechecking is skipped by default when you call brioche build (unless you pass --check), so that’s probably what happened here, just a type error instead of a runtime error

@kylewlacy kylewlacy enabled auto-merge (squash) July 23, 2024 09:10
@kylewlacy kylewlacy merged commit 2cf82dc into brioche-dev:main Jul 23, 2024
3 checks passed
@jaudiger jaudiger deleted the add-ruff-package branch July 23, 2024 19:28
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