Make source archive download command configurable#1815
Merged
mosteo merged 17 commits intoJan 9, 2025
Conversation
Contributor
Author
|
Ready for review @mosteo. |
mosteo
requested changes
Jan 8, 2025
mosteo
left a comment
Member
There was a problem hiding this comment.
A nice set of improvements, I identified just a couple of minor changes.
| function Valid_Builtin_Check (Lvl : Level) return CLIC.Config.Check_Import | ||
| is (case Lvl is | ||
| when Global => Valid_Global_Builtin'Access, | ||
| when others => Valid_Local_Builtin'Access); |
Member
There was a problem hiding this comment.
I'd rather have here the explicit case instead of others.
| assert_match(r"arg1 abproject1\.gprab arg3", p.out) | ||
|
|
||
| # Verify that an `editor.cmd` value in a crate's local `settings.toml` is | ||
| # ignored with a warning (otherwise this would offer an inconspicouous vector |
Comment on lines
+643
to
+654
| def unset_setting(key: str, local: bool = False): | ||
| """ | ||
| Unset a key with `alr settings` | ||
|
|
||
| Sets the value globally unless `local` is `True`. | ||
| """ | ||
| if local: | ||
| run_alr("settings", "--unset", key) | ||
| else: | ||
| run_alr("settings", "--global", "--unset", key) | ||
|
|
||
| def set_setting(key: str, value: str, local: bool = False): |
Member
There was a problem hiding this comment.
For consistency with other alr_blah, I'd rename those to alr_settings_set and alr_settings_unset.
mosteo
approved these changes
Jan 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At the moment, the biggest obstacle to using Alire for private development is that source archives cannot be fetched from servers which require user authentication (this is already possible for private Git repositories, since the
gitcommand implements all authentication schemes commonly used for Git repositories).Unfortunately, there is a much wider variety of commonly used schemes and protocols for authenticated file downloads than for Git repos, so it does not seem feasible to support all of them natively. This PR therefore makes the command used for downloads (globally) configurable with the
alr settingskeyorigins.archive.download_cmd, without changing the default behaviour.This PR also:
editor.cmdsetting being read from the local crate'ssettings.toml(this seemed to me unexpected behaviour, and possibly something of a security vulnerability)distribution.overridesettingfail_on_errorin thespellcheckworkflowPR creation checklist
doc/user-changes.mdhas been updated.