Open jpds opened 2 years ago
You can pin the dependency with alr with --use ../my_lib
. This should add the following to your alire.toml file:
[[pins]]
my_lib = { path='../my_lib' }
Btw, when publishing a crate, you don't necessarily have to create and upload a tar file. You can just point to a git commit in a repository. For example:
[origin]
url = "git+https://github.com/onox/json-ada.git"
commit = "d429d7af880ab9ed38d58ac08c1c9a16e7697752"
subdir = "json"
The subdir
is only needed in a repository with multiple crates.
Thanks @onox for taking the lead.
I guess we need to improve our docs for this usual case in which you want to start parallel development of a couple of related projects.
Is there a way to specify the manifest to use with a local crate?
In my case, I want to use a custom version of ada-util which contains multiples Alire manifests, like alire.toml
, alire-xml.toml
, etc.
Is there a way to do something like:
utilada_xml = { path="./ada-util", manifest="alire-xml.toml" }
?
No, there's no way to do that at present. Alire expects a single alire.toml
per crate. Even if several crates are maintained in one repository, to actually be usable as a monorepo each crate should have their own alire.toml
in a separate folder. Of course these manifests could point to the proper project files elsewhere, but it seems that ada-util
doesn't do that.
ada-util
seems to be structured in another way. I know that its publishing isn't straightforward. You could try to reorganize the manifests as I said and if it works as expected submit the patch to ada-util
.
As a new Alire user - it's not clear to me how to go from:
...to actually being able to use
my_lib
inmy_bin
. Reading publishing.md, I can see that I need to run:..but I do not want to use GitHub for a newly created and in development library.
To just try and make something work locally - I was able to take the
alire.toml
frommy_lib
, renamed it tomy_lib-0.1.0-dev.toml
and gave it a fake[origin]
section. I then placed it in a local index with the layout of the community index, and run:It doesn't seem to have copied a file across though:
Ideally, I think I'd just like to be able to do: