Hi Andrius,
Following your suggestion at Support workspaces · Issue #101 · sensmetry/sysand · GitHub
First test - direct https link to a kpar in github release
sysand add https://github.com/sensmetry/smart-home-hub-example/releases/download/v0.1.0/smart_home_hub_example-0.1.0.kpar works.
second test - direct https link to a kpar in github private index
(Yes, i know this repo was set up to be used with sysand add urn:… -–index https://…., but here I am testing the direct https method).
sysand add https://github.com/sensmetry/sysand-private-index/blob/main/packages/test_sysand_package/test_sysand_package-0.0.1.kpar
Result:
error: Failed to satisfy usage constraints:requested project(s) alternative nr 0 depends on sysand-private-index/packages/test_sysand_package/test_sysand_package-0.0.1.kpar at main · sensmetry/sysand-private-index · GitHub .
I guess that test package has internal dependencies that cannot be resolved.
This example also raised something new for me:
- In my test directory, I had succesfully added
smart_home_hub_example-0.1.0.kpar.
- Cleaned the test directory, deleting
sysand_env, meta.json and project.json. Forgot to delete sysand-lock.toml.
- Tested adding
test_sysand_package-0.0.1.kpar above. Failed with error above.
- Explored the results of
sysand env list, sysand info, sysand sync.
- Discovered
sysand sync installed smart_home_hub_example-0.1.0.kpar.
- This is correct, I had forgotten to delete
sysand-lock.toml, which was still the lock file from my last test.
- Unexpected: I had assumed that upon
sysand add xxx, the lock file would be updated. It turns out sysand-lock.toml is only updated upon a successful sysand add.
Per the docs:
By default this will also update the lockfile and sync the local environment
I now assume it only updates the lockfile if sysand add was successful. In my example above, according to the docs, I would expect the lockfile to update to list even the faulty usage, so that standalone calls to sysand sync report the error on the faulty usage. This is probably the desirable behaviour - want the lock file kept up to date, even if faulty.
Third test - direct https link to a kpar in a remote git repo (gitea)
- Attempt:
sysand add https://…
- Result: Same result as test 2 -
error: Failed to satisfy usage constraints:requested project(s) alternative nr 0 depends on....
- Attempt with —no-sync:
sysand add https://… —no-sync
- Result: same error
- Expectation: with
–no-sync, dependencies should not be traversed?
Sysand will be very useful. Some improvements in the error reporting to figure out root causes and next steps will be great!
Addendum:
I was just writing a feature request for something similar to pip show or pip index versions, then found you have sysand info -a IRI. This is very nice. It allows me to check if an IRI is resolvable without first having to attempt sysand add, then remove failures with sysand remove. Would have been a better way to perform the above tests.