Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 08:57
    mosteo commented #725
  • Apr 21 22:22
    onox commented #725
  • Apr 21 16:19
    mosteo commented #725
  • Apr 21 00:16
    onox commented #725
  • Apr 21 00:08
    onox commented #725
  • Apr 20 23:37
    onox commented #725
  • Apr 20 23:26
    onox commented #496
  • Apr 20 14:49
    kalkin commented #496
  • Apr 20 11:07
    mosteo commented #725
  • Apr 20 10:53
    mosteo commented #496
  • Apr 19 17:57
    onox edited #725
  • Apr 19 17:49
    onox edited #725
  • Apr 19 17:48
    onox opened #725
  • Apr 19 17:07
    onox commented #496
  • Apr 19 17:02
    onox commented #496
  • Apr 19 15:22
    mosteo commented #496
  • Apr 19 15:10
    mosteo labeled #724
  • Apr 19 15:10
    mosteo labeled #724
  • Apr 19 15:10
    mosteo labeled #724
  • Apr 19 15:10
    mosteo opened #724
onox
@onox
if I have a dependency chain A -> B - >C, then I can run alr build in B and it will build C and B, but if I run alr build in A, then it cannot find C
using https://github.com/onox/orka, I can build orka (which needs orka_types, orka_simd, and orka_transforms), but I cannot build orka_glfw (which depends on orka)
I'm using path = "file:../orka" in the alire.lock files btw
onox
@onox
it complains about unknown project files for orka's deps when building orka_glfw
Fabien Chouteau
@Fabien-Chouteau
are you editing alire.lock yourself?
onox
@onox
yes, I had to edit the files, otherwise there would be machine-dependent paths in the files that wouldn't work on machines of other people
Alire puts absolute paths in the alire.lock files
Fabien Chouteau
@Fabien-Chouteau
I am not saying this is the cause of the problem but there files are not supposed to be edited like that.
When you say "cannot find C", what does that mean?
onox
@onox
orka.gpr:1:06: unknown project file: "orka_types"
orka.gpr:2:06: unknown project file: "orka_simd"
etc.
Fabien Chouteau
@Fabien-Chouteau
What does alr printenvshow?
onox
@onox
hmm.. orka_types, etc. are present while I'm in the orka/ folder, but not if I'm in the orka_glfw/ folder
if I remove orka from orka_glfw and then re-add it with alr with orka --use=../orka, then alire says:
   +⚠ orka_egl        ^1.0.0 (new,missing,indirect)                
   +⚠ orka_simd       ^1.0.0 (new,missing,indirect)                
   +⚠ orka_transforms ^1.0.0 (new,missing,indirect)                
   +⚠ orka_types      ^1.0.0 (new,missing,indirect)
Do you want to proceed?
[Y] Yes  [N] No  (default is No) yes
error: failed precondition from alire-solutions.ads:313
Fabien Chouteau
@Fabien-Chouteau
error: failed precondition from alire-solutions.ads:313 look like a consequence of editing the locks, but I am not sure.
I think using lock files for what you are doing is maybe not the best way.
onox
@onox
it happens with just glfw stuff in the alire.lock file
Fabien Chouteau
@Fabien-Chouteau
You should try making an local Alire index and use relative path in that index.
onox
@onox
do other people need to do that as well then if they want to git clone orka?
Fabien Chouteau
@Fabien-Chouteau
just alr index --add=...
onox
@onox
I suppose I should/can add the index to my git repo?
onox
@onox
I'm not sure this is the way to go. I need to handcraft more than a dozen extra .toml files
Alejandro R Mosteo
@mosteo
catching up now
first, as Fabien said, lockfiles are not intended for manual editing. If you absolutely need to do that, that's something we should fix by adding the necessary functionality elsewhere.
second, having a local index is a solution, but as that is onerous (as you found), a better solution would be needed. The intended approach is to use local pins (for development only, not for publishing). If these fall short, we can see why and how to fix it
so, going back to the original problem, I don't see the full picture. @onox, you described having A -> B -> C. I understand you pinned C from B, and B from A?
Alejandro R Mosteo
@mosteo
Assuming that's broken (it should work, so I'll check), my first idea (untested) would be to, during development, make A -> C explicit. Once C is published in the index, you can remove artificially needed pins.
As a side note, I'm currently starting work on pins to remote repos. These should allow publishing crates with dependencies on unpublished crates. I guess those also should help with development of several crates at the same time. But local pins should ideally cover all needs, previously.
Alejandro R Mosteo
@mosteo
Finally, for the wider issue of monorepos: IIUC, you mean by that repos where several crates are stored in several folders, the root folder not being itself a crate. These should work normally locally, but there is no provision to publish them as a whole. You can publish them individually, as source files (not as repos, as we lack the option to specify a subfolder with a commit). What you can't currently do (or shouldn't do, as was not in the feature design) is publish local pins to each other. They should refer to themselves in the index. Remote pins (when existing) wouldn't help either in this case as they would also lack the subfolder pointer. Unless we implement that for all repo remotes.
with all that out of the way... I need to get more down to the details with you :) If you'd be so kind @onox to point me to the repo you're working with... Perhaps we can work over this in a new issue at GH.
Alejandro R Mosteo
@mosteo
Or hijack #662, which I think emanates from the same issue. I'm answering you there now.
onox
@onox
@mosteo I have 2 monorepos: https://github.com/onox/wayland-ada and https://github.com/onox/orka. I can also publish a very small yarn 2 repo if you want to take a look at that

you mean by that repos where several crates are stored in several folders, the root folder not being itself a crate.

yes

onox
@onox
@mosteo See https://github.com/onox/yarn-monorepo <-- only 1 .lock file + 3 package.json files (for 2 packages + 1 for the root)
onox
@onox
I'll continue in alire-project/alire#662
Alejandro R Mosteo
@mosteo
Thanks @onox, I'll check these resources
onox
@onox
Anyone who is running Alire on msys2 on Windows 10?
Fabien Chouteau
@Fabien-Chouteau
I do, sometimes.
Marcel Hernandez
@1ma
Can Alire just download the dependencies of a project without building it? I can't seem to find that option.
onox
@onox
@1ma I can't find the option either. In other package managers there is often a command called install to download the dependencies
Marcel Hernandez
@1ma
@onox to answer myself: alr clean. a bit counter-intuitive, imo.
Alejandro R Mosteo
@mosteo
@1ma Isn't alr get what you want? You'd get also the project itself, which may be unwanted, but within its alire/cache/dependencies you should find what you want, and nothing is built (unless --build).
Marcel Hernandez
@1ma
alr get replies "No crate requested", as if expecting a crate name as an argument. On Alire 1.0.0
Maxim Reznik
@reznikmm
Looks like alr printenv also downloads crate dependencies
Marcel Hernandez
@1ma
Hm, makes sense. It guess it needs them to know what to print.
Alejandro R Mosteo
@mosteo
yes, anything that requires a complete solution will retrieve dependencies

alr get replies "No crate requested", as if expecting a crate name as an argument. On Alire 1.0.0

Correct, you have to say alr get <crate> and it will download both the crate and its dependencies