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. #1237

Closed
wants to merge 8 commits into from

Conversation

panno8M
Copy link

@panno8M panno8M commented Jul 7, 2024

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.

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.

la .panon. added 4 commits July 7, 2024 12:20
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://.
@panno8M panno8M closed this Jul 8, 2024
@panno8M panno8M reopened this Jul 8, 2024
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.

1 participant