chocolatey / choco-wiki

The content from this repository has been moved to https://github.com/chocolatey/docs. If you have found an issue, or want to submit a fix, then please open an issue, or a PR, on that repository.
Other
80 stars 70 forks source link

Needs chocolatey source for dependencies when testing locally #115

Open ericoporto opened 5 years ago

ericoporto commented 5 years ago

Here on Testing Package, under Creating Packages

https://github.com/chocolatey/choco/wiki/CreatePackages#testing-your-package

When suggesting using sources from local directory, it needs also to pass the chocolatey repo as a source, otherwise you won't be able to pull dependencies, and you will be met with a Unable to resolve dependency error instead.

By passing both the local dir and remote dir like -s “.,chocolatey” things will just work!

gep13 commented 5 years ago

@ericoporto this information is already contained within the section that you mention. It is here:

image

When specifying a source, you can either use it's name, i.e. chocolatey or it's full path i.e. https://chocolatey.org/api/v2

gep13 commented 5 years ago

As a result, I don't think any additional changes are required here. What are y our thoughts?

ericoporto commented 5 years ago

Short version: This is way too far and no one will read.

Long version: To me this only makes sense in scenery where I am testing two packages I own, and one depends on the other, and their versions are tied together - like some client/server application. Even then, most cases they would be submitted separately for approval in the community repository.

Also it's saying something about API, do you mean package repository remote?

I see no reason why current folder plus current remote (whichever it is, maybe in a company environment it will be a local server) shouldn't be the default, but this is a different issue at different repository. Also current error will suggest you mistyped the version number or package name, not that you have no search url besides current folder - which, I think, could be catch and reported in the error message.

gep13 commented 5 years ago

@ericoporto unfortunately, I am not sure I follow your thinking here. If you would like to take a stab at improving this documentation via a PR, we can certainly discuss further.

ericoporto commented 5 years ago

The documentation introduces the concept of dependencies before it tells you the command for testing.

The scenario where you don't want to get dependencies from an external source is smaller - hence why I think it's rather a problem of defaults.

Anyway, I can submit a PR just not right now - I am on my phone.