-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Pins in the manifest #743
Pins in the manifest #743
Conversation
This looks great! |
@@ -0,0 +1,4 @@ | |||
-- Configuration for alr generated by Alire |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this folder not be added to git?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by #744
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in Alire, but they still should not be checked in here.
I did some testing with [[pins]]
orka_types = {path = "../orka_types"} and removing alire.lock and then running:
It has found the folder of orka_types 👍 (and gives me the original alire.lock again) but if I remove alire.lock and then immediately run
|
Thanks, @onox. The PR is still undercooked so I'll keep an eye out for these issues. |
Minor testsuite tweak for a change in logging format
We had two confusing Update_Dependencies and Update_And_Deploy_Dependencies that were in practice doing almost the same. There is now a single Sync_Dependencies.
For now, these cannot work as we are going to remove the ability to edit pins via `alr with`/`alr pin`. This functionality could be reintroduced at a later time.
Most of those should be reimplemented in their manual edition alternative
This is purely for user comfort and will probably result in dependencies having to be added at publish time. However, if we manage to restore command-line pinning, we can remove that pain by adding missing dependencies at that time.
Some tests are not easily portable without support from `alr with --use`. Since that should be easy to implement later, they are disabled for now and will be enabled in a subsequent patch.
Also the required code changes to pass the test
This one is ready for review. There are quite some disabled tests and some portions of unreachable code. I intend to tidy that up in a follow-up patch (since this one has grown already too large), in which at least Other than that, the new pins should be ready. @onox , as you have an use case, your feedback on this one would be great. |
@@ -0,0 +1,4 @@ | |||
-- Configuration for alr generated by Alire |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in Alire, but they still should not be checked in here.
Hello @mosteo, as I said live to Fabien, I think being able to specify a branch name in updatable pins would be a useful, or even necessary functionality in complex use cases. Thanks for tackling this! I think it will be the tipping point for a lot of us at AdaCore to start using Alire. |
@mosteo I tried to create a test crate for one of my project a found an issue. Here's how to reproduce: $ git clone --branch new_alr_pins https://github.com/Fabien-Chouteau/bbqueue-spark
$ cd cd bbqueue-spark/tests
$ alr run main_framed
[works fine]
$ touch alire.toml # to simulate modification of the manifest
$ alr run main_framed
# Detected changes in manifest, synchronizing workspace...
Dependencies automatically updated as follows:
New solution is incomplete.
# atomic ~0.3 (missing)
## bbqueue 0.2.0 (pin=../../bbqueue-spark,upgraded from 0.1.0)
warn: Generating possibly incomplete environment because of missing dependencies
warn: Generating possibly incomplete configuration because of missing dependencies
bbqueue.gpr:3:06: unknown project file: "atomic.gpr"
bbqueue.gpr:3:06: imported by "/tmp/bbqueue-spark/bbqueue.gpr"
bbqueue.gpr:3:06: imported by "/tmp/bbqueue-spark/tests/config/tests_config.gpr"
bbqueue.gpr:3:06: imported by "/tmp/bbqueue-spark/tests/tests.gpr"
gprbuild: "tests.gpr" processing failed
error: Command ["gprbuild", "-gnatwU", "-j0", "-p", "-P", "tests.gpr"] exited with code 4
error: Build failed
|
Right, this is at my top of follow-up improvements. I'll tackle it in a follow-up PR. |
I cannot reproduce it (it runs properly both times) but there's definitely something wrong because the first time around the pin is not detected. Will fix that and we'll see if it's related. |
We were creating an empty lockfile, which was newer than the manifest, and thus not triggering the expected automatic update.
This was a bug detected and corrected in the previous commit
Ready for another round, @Fabien-Chouteau . Let me know if this improved things for your test. |
@mosteo Pins in wayland-ada repo seem to work, but Alire could try to simplify the relative paths of indirect dependencies, it currently just concatenates the paths. For example, in -path = "file:../wayland_ada_scanner"
+path = "file:../wayland_protocols_ada/../wayland_client_ada/../wayland_ada_scanner" Not a big problem though. |
I can run I get a few errors when running
If I go to ../orka/orka ( (If I run And I get some exceptions when running
There are many more similar and duplicate exceptions, these are just a few of them. I can commit the changes to the |
I have pushed some commits with pins added to the various alire.toml files. Also get this error in awt:
even though I have the following in [gpr-set-externals.'case(os)']
linux = { ALR_OS = "linux" } |
Actually I think this is caused by the relative path simplification functions. This is in the lockfile? |
Thanks, this will help me for sure. |
@onox, thanks to your repos I have a clear picture of what's going wrong. I will submit the fix in a separate PR not to make this one even more complex, as it touches on recursive pin loading and the solver. I'll ping you there when ready. |
Pins are now to be defined in the manifest:
This PR is still incomplete, but is testable: the new pins work, and the old pins also work, but such old pins will be forgotten after any update (explicitly requested, or by editing the manifest), as the update process syncs with the pins in the manifest.
To do:
Fixes #721