-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Caret ranges not respected properly #9775
Comments
I was debugging a problem with a guy in |
Atom purposefully does not allow packages to depend on other packages in any way. Atom can only load one version of a given package at a time; packages aren't like I'm guessing that the packages you mentioned have their own code that dynamically installs We're strongly opposed to any feature where packages explicitly depend on other specific packages, because it creates an unnecessarily tight coupling between those packages that could be avoided using services. With services, another package can implement the same interface with improvements (e.g. someone could create their own linter package that provides the same service, but uses a different UI). We have an open issue on apm, atom/apm#387, that discusses adding a new feature called 'required services' that will allow packages to specify that certain services (e.g. |
This issue isn't about packages, but their dependencies. All of these Atom packages have this in their
Let's say packageA specifies If Atom loads packageA first, then packageB will be using the The "required services" sounds great, subscribed to that issue, but package level dependency has absolutely nothing to do with this problem. |
Just for clarification: |
Oh I see. Thanks @steelbrain. Yeah, maybe this is a bug in the module-cache. It uses |
I'm going to close this issue, I haven't noticed it recently. I'm not sure if that's just because it's no longer an issue, or there hasn't been a situation that exposes it, in either case though if it's still a problem later this can be re-opened or re-filed. |
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks! |
I've been seeing several issues with caret ranges not being respected in package dependencies.
Several of the
linter-*
packages depend on the atom-linter package, so there are usually several instances of it installed in a particular Atom installation. The issue is that when a package with an older version of the library loads it before a package asking for a newer version loads, the older version is used instead.For example:
linter-js-yaml
had version 3.3.7 installed ofatom-linter
, which is perfectly fine for its asked for version of"^3.3.7"
. When testinglinter-php
which had"^3.3.9"
specified in its package.json however, I was getting errors that had been fixed in 3.3.8 and checking the trace it showed that it was using the 3.3.7 fromlinter-js-yaml
's installation.According to semver's definiton of caret ranges a request for
"^3.3.9"
should be equivalent to">=3.3.9 <4.0.0"
, but Atom is loading3.3.7
which does not fall within that range.I've been seeing this on Windows 10 x64, on Atom 1.3.0-beta6. (And older versions of each before in the past).
I think I've seen it before on Ubuntu, but can't verify that at the moment.
If this has already been reported please point me in the right direction as I could not find it.
The text was updated successfully, but these errors were encountered: