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

Update to official closure compiler plugin #462

Closed
funkyboy opened this issue Feb 7, 2018 · 21 comments
Closed

Update to official closure compiler plugin #462

funkyboy opened this issue Feb 7, 2018 · 21 comments
Assignees
Labels
enhancement New feature or improved functionality.

Comments

@funkyboy
Copy link
Contributor

funkyboy commented Feb 7, 2018

This: https://www.npmjs.com/package/google-closure-compiler

Otherwise the build on CI fails, because the current one looks for the jar file in the wrong path

@funkyboy funkyboy self-assigned this Feb 7, 2018
@funkyboy
Copy link
Contributor Author

funkyboy commented Feb 7, 2018

This is blocking for the parallelization in #452

@funkyboy funkyboy added enhancement New feature or improved functionality. blocker labels Feb 7, 2018
@SimonWoolf
Copy link
Member

why does the ci build need the closure compiler at all? The only thing we use the closure compiler for is minification, and iirc the tests use the non-minified lib so that we get understandable stacktraces if the lib crashes

@paddybyers
Copy link
Member

I assume it's because all grunt tasks (including running tests) have a dependency on the build task, which in turn needs the closure compiler.

@funkyboy
Copy link
Contributor Author

funkyboy commented Feb 7, 2018

If you don’t run nodeunit before karma tests you end up here
https://travis-ci.org/ably/ably-js/jobs/338615662

@funkyboy
Copy link
Contributor Author

funkyboy commented Feb 7, 2018

@SimonWoolf @paddybyers speaking of which. Any arguments against committing the .jar directly to the repo? That would allow consistent builds both locally and on the CI.

@paddybyers
Copy link
Member

Any arguments against committing the .jar directly to the repo?

It's now available via npm: https://www.npmjs.com/package/google-closure-compiler

Shouldn't we update to that (ie add it to devDependencies) and remove the curl, unzip tasks?

@funkyboy
Copy link
Contributor Author

funkyboy commented Feb 7, 2018

Yep, that’s what I linked above, my first proposal.

@paddybyers
Copy link
Member

Yep, that’s what I linked above, my first proposal.

ah, ok ;) I think we should do this.

@funkyboy
Copy link
Contributor Author

funkyboy commented Feb 7, 2018

I just hope it’s a matter of swapping a package with another. said the dreamer

@paddybyers
Copy link
Member

Try this: #463

@funkyboy
Copy link
Contributor Author

funkyboy commented Feb 8, 2018

@SimonWoolf @paddybyers I removed the compiler altogether. We have this: https://travis-ci.org/ably/ably-js/jobs/338925797#L721 but tests work with no problem :)

@paddybyers
Copy link
Member

I removed the compiler altogether. We have this: https://travis-ci.org/ably/ably-js/jobs/338925797#L721 but tests work with no problem :)

Yes, but that's not really the point of my PR. We will continue to need the closure compiler for the minified versions of the library. My PR updates that. Then are you going to run tests on that version of the library (ie that package.json) or a different one?

@funkyboy
Copy link
Contributor Author

funkyboy commented Feb 8, 2018

@paddybyers Sorry, should have been more explicit :) I propose to remove the compiler. After all it's needed only to make the official release. WDYT?

@paddybyers
Copy link
Member

I propose to remove the compiler. After all it's needed only to make the official release. WDYT?

I don't know whether or not it is used as-is, bundled as part of the static assets of the library. Creating the minified libs could just be part of the deploy pipeline. But then what if we want to run tests using those minified versions? What if a 3rd party wants to modify/fix the library and wants the resulting minified version? I don't really see what we gain by removing it but I'm open to discussion.

@SimonWoolf ?

@funkyboy funkyboy removed the blocker label Feb 8, 2018
@funkyboy
Copy link
Contributor Author

funkyboy commented Feb 8, 2018

@paddybyers @SimonWoolf I just discovered that we can't run too many BrowserStack in parallel.
So this is not a blocker anymore.
I'd leave this open. Let's talk about when/how to update dependencies in the tech catchup.

@paddybyers
Copy link
Member

I just discovered that we can't run too many BrowserStack in parallel.
So this is not a blocker anymore.

I don't understand the relationship between the two issues

@funkyboy
Copy link
Contributor Author

funkyboy commented Feb 8, 2018

@paddybyers when I ran BS and nodeunit tests in parallel that meant they were all run on different machines. Running BS tests on a "machine" without running nodeunit first led to the "missing closure compiler" issue.

@paddybyers
Copy link
Member

OK. Well the fact remains that we should either remove, or update, the support for the closure compiler in this library. I think it's valid to have a discussion about whether it really belongs as part of the deploy pipeline, but what we have today seems to be broken, and we should do something about that.

@funkyboy
Copy link
Contributor Author

funkyboy commented Feb 8, 2018

I agree that we should update it.
I'd first run tests on minified JS before updating the compiler. Feels safer. WDYT?

@paddybyers
Copy link
Member

Feels safer. WDYT?

Yes, definitely. So far all I did is verify that it installs and generates a minified script.

@funkyboy
Copy link
Contributor Author

Fixed in #463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improved functionality.
Development

No branches or pull requests

3 participants