You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[services] Fix services when using versioned packages (#994)
## Summary
This addresses related 3 bugs:
* "versioned" packages where not triggering plugins/services. This was
solved by updating plugin packages to use `nix.Input` and then using
`CanonicalName()` as the triggering name (In short, this means we use
`python` instead of `python@3`)
* Updated plugins to recognize canonical names in `match` field. (e.g.
`apache` plugin should trigger for `apache` and `apacheHttpd`). This was
implemented by augmenting the regular expression. Another approach would
have been to save the attribute path returned by search and use that
instead. Since it only affects a very limited number of plugins and we
don't really want to expand usage of `match` too much, I think this is
an OK tradeoff.
* minor bug: `PackageAttributePath()` in `input.go` was causing legacy
packages that don't exist to get resolved (e.g. when doing `devbox add
foobar`). This wasn't breaking anything because no packages get added to
`devbox.json` but it would leave bad data in lockfile.
## How was it tested?
`devbox add apach@2`
`devbox add php`
`devbox services ls`
`devbox add foobar` shows error and doesn't add to lockfile.
0 commit comments