-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
xpm uninstall --global
fails if package version is @latest
#202
Comments
Although it seems obvious that the install and uninstall must be consistent, under the bonnet things are a bit more complicated. xpm has no understanding of what At uninstall time, which may be long after install, this information not only that it is no longer available, but asking the server for the meaning of So, strictly speaking, uninstall What can be done is to cheat and compute For normal npm packages which use a strict semver string, this should work. Unfortunately binary xpacks use an extended semver, with additional numbers defined as pre-releases. If the package that provides semver services is able to sort such strings, we probably have an acceptable solution. |
Wouldn't that make sense given that that seems to be what happens when working within an xPack project directory using Or else just make Either way, what happens within a project directory and what happens when using |
I guess that At the global level, if multiple versions are installed, the version is mandatory. Or should be, I don't know how the code behaves now. |
Ah - I didn't realise that even though it makes sense! :-) In that case maybe it would make more sense if...
|
It makes sense. I'll improve the validation and error processing. |
I also noticed this - is it deliberate?
|
On 31 Jul 2024, at 00:46, Tommy Murphy ***@***.***> wrote:
# No version specified but works the same as if @latest or @14.1.0-1.1 were specified
xpm install @xpack-dev-tools/riscv-none-elf-gcc --verbose
that's correct, the default is @latest.
however I prefer to add it explicitly in the documentation.
|
But not when I do I'm my opinion the handling of version specifiers could/should ideally be more consistent. |
You're right. What would be the ideal consistent behaviour for both install and uninstall? |
I need to review the current behaviour of project based and global package installs/uninstalls more systematically and then think about this. |
As far as I can see... (An "xPack enabled project directory" is one in which Global
xPack enabled project directory
Am I missing anything here? |
For completeness you can add the cases with @latest in xPack enabled project, but they are obvious.
Not for the moment. Anyways, the xpm behaviour should be consistent to npm, if possible. (BTW, you can install xPacks with npm too, but the binary archive is not automatically unpacked in the |
Describe the bug
xpm uninstall --global
fails with@latest
even when the specified package is installed.To Reproduce
I did this on Windows 10:
Expected behaviour
I would have expected the
xpm uninstall
using@latest
as the version to work.Actual behaviour
xpm uninstall
with a package version of@latest
fails but it works if I give it a specific version number.Context
npm doctor
Comments
None.
The text was updated successfully, but these errors were encountered: