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

Configurable Command Plugin Build Configuration #1365

Open
MahdiBM opened this issue Feb 9, 2025 · 2 comments
Open

Configurable Command Plugin Build Configuration #1365

MahdiBM opened this issue Feb 9, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@MahdiBM
Copy link
Contributor

MahdiBM commented Feb 9, 2025

Configurable Command Plugin Permissions changes are working very nicely and have resolved the other issue I had filed.

We should add build configuration to the list of configurable settings too, for heavier operations.

Example:

time swift package -c release --allow-writing-to-package-directory generate-code-from-openapi
...
________________________________________________________
Executed in   32.80 secs    fish           external
   usr time   49.43 secs    0.11 millis   49.43 secs
   sys time    0.81 secs    1.46 millis    0.80 secs
time swift package --allow-writing-to-package-directory generate-code-from-openapi
...
________________________________________________________
Executed in   68.68 secs    fish           external
   usr time  115.34 secs    0.12 millis  115.34 secs
   sys time    1.44 secs    1.74 millis    1.44 secs

The non-release version takes more than twice as much to finish, wasting ~36 seconds.

This is with hello-world-async-http-client-example and replacing openapi.yaml with GitHub's on my M1 Macbook Pro.

@award999
Copy link
Contributor

The swift-plugin task type can take freeform args. Is there a strong justification to tie this to a setting?

@MahdiBM
Copy link
Contributor Author

MahdiBM commented Feb 12, 2025

Hmm I'd say yes for this one? It should also be fine if you were to implement this in a more free-form way. Like accepting package-command-args. But it should be separate for each plugin as most plugins are not worth release-building.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants