When working with package-inferred systems, we have to deal with many packages and some of their names can be prefixes of another. Here is an example from a real-life application:
app/models/job
app/models/job-application
Now, let's imagine we are in the app/api/jobs package which already has a definition:
This commit fixes the problem and after the fix, SLY will ignore import from app/models/job-application and will add a new import-from form.
For the minimal example to reproduce the problem I'm fixing, enter this code in the lisp buffer eval all package definitions and try to execute M-x sly-import-symbol-at-point command on foo:minor symbol:
When working with package-inferred systems, we have to deal with many packages and some of their names can be prefixes of another. Here is an example from a real-life application:
app/models/job
app/models/job-application
Now, let's imagine we are in the app/api/jobs package which already has a definition:
Now if we try to call
M-x sly-import-symbol-at-point
onapp/models/job:foo
symbol, then SLY will break the import-from form like thisThis commit fixes the problem and after the fix, SLY will ignore import from
app/models/job-application
and will add a newimport-from
form.For the minimal example to reproduce the problem I'm fixing, enter this code in the lisp buffer eval all package definitions and try to execute
M-x sly-import-symbol-at-point
command onfoo:minor
symbol: