Skip to content

Fix broken prepare platform on NPM 5.5.1 #3218

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

Conversation

buuhuu
Copy link

@buuhuu buuhuu commented Nov 13, 2017

Instead of taking the first updated dependency, we resolve the one passed by userSpecifiedPackageName) (#3217)

@ns-bot
Copy link

ns-bot commented Nov 13, 2017

Can one of the admins verify this patch?

@dtopuzov
Copy link
Contributor

run ci

@dtopuzov dtopuzov closed this Nov 13, 2017
@dtopuzov dtopuzov reopened this Nov 13, 2017
@ns-bot
Copy link

ns-bot commented Nov 13, 2017

Can one of the admins verify this patch?

@rosen-vladimirov
Copy link
Contributor

Hey @buuhuu ,
Thank you very much for your efforts. Another community member already prepared a PR for a similar issue and we are currently checking the implementation. #3213
Can you help us by verifying the other solution works on your side as well?

We'll see which solution covers all scenarios and we'll decide which PR to merge.
Once again, thanks a lot for making this PR!

@buuhuu
Copy link
Author

buuhuu commented Nov 13, 2017

Your are right, this is exactly the same and i think, without checking my project, this will resolve my issue as well. Though I don’t see the need of the split by @ nor the need of using _ for that in #3213.

The split should not be necessary as the parameter, from its name, is not a package descriptor but a package name. The find can be done as shown in this PR.

@rosen-vladimirov
Copy link
Contributor

Hey @buuhuu ,
The idea of the split is that userSpecifiedPackageName may contain both package name and version, for example:

$ tns plugin add [email protected]
$ tns platform add [email protected]

The other scenario where the userSpecifiedPackageName may contain different informatio (not the real package name) is when a path to local package or .tgz is installed:

$ tns plugin add nativescript-imagepicker-packed.tgz
$ tns platform add android --frameworkPath package.tgz

In these cases we still have to default to something (as done in the other PR).

I've also checked the failing tests in both PRs (sorry you are unable to see them, we will do some work to show the results in the PR itself in the future) - we have some integration tests that install runtime packages with --frameworkPath and they fail on this PR , but pass on the other one.

So I'm going to close this one and continue checking the other PR.

Thanks again for taking your time to create this PR, we really appreciate it and we'll be glad to assist you further in your next contributions to NativeScript!

@rosen-vladimirov
Copy link
Contributor

Closing in favor of #3213

@buuhuu
Copy link
Author

buuhuu commented Nov 14, 2017

Thanks for the explanation, that completely makes sense.

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.

4 participants