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

Fix logic for release-canary grunt task #1

Open
ryanzec opened this issue May 13, 2014 · 2 comments
Open

Fix logic for release-canary grunt task #1

ryanzec opened this issue May 13, 2014 · 2 comments
Assignees
Labels

Comments

@ryanzec
Copy link

ryanzec commented May 13, 2014

I think there is an issue with how the release-canary grunt task works. On https://github.com/dalekjs/dalek-build-tools/blob/master/tasks/releaseCanary.js#L9 there is a _.clone() call that is making a clone for the canary version of the dependencies however this is a shallow clone. Since this is a shallow clone, when the canaryPkg.dependencies get modified on lines https://github.com/dalekjs/dalek-build-tools/blob/master/tasks/releaseCanary.js#L15-20, it is also modifying the pkg.dependencies.

Then on line https://github.com/dalekjs/dalek-build-tools/blob/master/tasks/releaseCanary.js#L30 where it is making the changes to the file contents, I believe pack at that point will have -canary at the end so it will look for instances that have -canary and add another -canary (which I believe it why we are getting the -canary-canary issue in another place in the code).

If https://github.com/dalekjs/dalek-build-tools/blob/master/tasks/releaseCanary.js#L9 were changes to:

var canaryPkg = grunt.util._.clone(pkg, true);

That would create a deep clone and than modifying canaryPkg.dependencies should not effect pkg.dependencies.

You can also undo dalekjs/dalek-driver-native#9 which was to fix what the change I am recommend here should fix.

I would make this change myself however I don't have an environment to test this locally (for all I know, I am completely wrong) so I will assign this to @asciidisco since he does have a way to test this locally.

@asciidisco
Copy link
Member

Just giving an update, I´m on it. Like. On it right now :D

@ryanzec
Copy link
Author

ryanzec commented Jul 18, 2014

Did my suggestion fix the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants