Because of the hastiness I did for the project, I haven't architectured this correctly e.g. give accurate error messages i.e. if src is missing it gives error message that it is unsupported format.
I will begin refactoring the entirety of the project from scratch but this will be a low priority effort.
This will supersede and close #96 (false alarm)
Now that we understood how cargo works when building, we can finally fix some minor bugs and improve code quality. Yay! 🫠
The current structure of the project is overall okay-ish though so we can take advantage of that.
Agenda
[ ] Improve CLI description and naming
[ ] Use CARGO_HOME for vendoring dependencies. Better than cargo vendor. We now use cargo fetch for this. Explore possible options for vendoring, most specifically, commonly used options in cargo
[ ] Explore niche options (not high priority) that focus on weird project configurations
[ ] Add options on where to spit out .cargo/config.toml if we can't accurately do that
[ ] Respecting lockfile properly. Use correct error messages if this option is used but the directory does not contain a lockfile e.g. regenerating the lockfile will just update the deps anyway so if such a case exists, we will notify and warn that we can't respect a lockfile if it does not exist.
[ ] Handle paths correctly in tarball (low priority but i think this does not need much attention since we do already. #96 is a false alarm because we vendored at the prjdir lol. so vendor is spitted out actually to the correct directory (because we use --sync and --manifest-path lmao). Let's document this properly ⏫
[ ] Document everything. Put it in docs/ directory or something and include it in the wiki.
Find alternatives to vendoring
I find it amusing that we have to go left and right about vendoring when we can "vendor" $CARGO_HOME/registry. If this will do great, we can use this as an alternative to the vendoring process and (ab)use $CARGO_HOME directly.
The process of vendoring $CARGO_HOME is as follows.
Create desired directory for where to put $CARGO_HOME. We can ideally use $PWD/.cargo in the new vendoring process
Set environmental variable $CARGO_HOME
Run cargo fetch or cargo update if desired.
"Vendor" $PWD/.cargo
Win in the specfile by setting $CARGO_HOME as desired e.g. at the root of the extracted tarball then run build and checks with --offline flag
Because of the hastiness I did for the project, I haven't architectured this correctly e.g. give accurate error messages i.e. if src is missing it gives error message that it is unsupported format.
I will begin refactoring the entirety of the project from scratch but this will be a low priority effort.
This will supersede and close #96 (false alarm)
Now that we understood how
cargo
works when building, we can finally fix some minor bugs and improve code quality. Yay! 🫠The current structure of the project is overall okay-ish though so we can take advantage of that.
Agenda
CARGO_HOME
for vendoring dependencies. Better thancargo vendor
. We now usecargo fetch
for this.Explore possible options for vendoring, most specifically, commonly used options incargo
Explore niche options (not high priority) that focus on weird project configurationsAdd options on where to spit out.cargo/config.toml
if we can't accurately do thatHandle paths correctly in tarball (low priority but i think this does not need much attention since we do already. #96 is a false alarm because we vendored at theprjdir
lol. sovendor
is spitted out actually to the correct directory (because we use--sync
and--manifest-path
lmao). Let's document this properly ⏫Document everything. Put it indocs/
directory or something and include it in the wiki.Find alternatives to vendoring
I find it amusing that we have to go left and right about
vendoring
when we can "vendor"$CARGO_HOME/registry
. If this will do great, we can use this as an alternative to the vendoring process and (ab)use$CARGO_HOME
directly.The process of vendoring
$CARGO_HOME
is as follows.$CARGO_HOME
. We can ideally use$PWD/.cargo
in the new vendoring process$CARGO_HOME
cargo fetch
orcargo update
if desired.$PWD/.cargo
$CARGO_HOME
as desired e.g. at the root of the extracted tarball then run build and checks with--offline
flagTested on jay and it does work!
From now on we go with this :pray:. @Firstyear thoughts for this alternative approach?