Skip to content
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

Allow local paths to be used for package specification. #1241

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

panno8M
Copy link

@panno8M panno8M commented Jul 8, 2024

Same content as PR #1237. I reworked it because I accidentally committed an extra one.

What this PR will allow to do

  • Allow local packages to be specified using ordinary paths
  • Deny local package cloning by specifying local path + --withDependencies when nimble develop.

This reduces confusion like #1134 and #1124.

Case Study

Install local package

# before:
cd path/to/pkg && nimble install
nimble install file:///absolute/path/to/pkg

# after:
nimble install /absolute/path/to/pkg
nimble install relative/path/to/pkg
# + before

Develop local package

# before:
nimble develop file:///absolute/path/to/pkg # -> the pkg will be cloned into subdir

# after:
nimble develop path/to/pkg # -> the pkg will be cloned into subdir
nimble develop path/to/pkg --withDependencies # -> the pkg will NOT be cloned. nimble.develop points to original.
# + before

Things to consider

Maybe we should have an option to clone local packages or not.

panno8M and others added 5 commits July 8, 2024 13:15
When developing local dependent packages, the unmodified implementation should use

```console
nimble develop file:///absolute/path/to/package
```

but this is not suitable for development since it will be cloned into a subdirectory.

If the package is a local package, it is easier to handle it as is without cloning.

With this change,

```console
nimble develop file:///absolute/path/to/package --withDependencies
```

would change nimble.develop as follows:

```diff
"dependencies": [
  ...
+ "absolute/path/to/package"
]
```
```console
nimble develop file:///absolute/path/to/package
```

is still a bit cumbersome and confusing for those not familiar with uri.

```console
nimble develop /absolute/path/to/package
```

directory exists, the preferred UX would be to interpret this implicitly as file://.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants