-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Insufficient test coverage to ensure that compiler releases work with Angular #2664
Comments
@MatrixFrog is this the place you suggest we could add missing tests? This fixture seems insufficiently powerful to reproduce issues that depend on Angular artifacts, like https://github.com/angular/closure-demo/blob/master/closure.conf does At a minimum, given the close relationship of Angular team and closure compiler, can we provide a manual test case to be run before closure releases to check that it's not broken? |
Our release process is pretty involved already. I'd prefer an automated test, even if it only runs inside Google. |
@alexeagle could you add more information here about the kind of breakages you're seeing and what tests would catch them? |
@MatrixFrog I put together the closure compiler build with the fixes required to get https://github.com/angular/closure-demo building with the latest closure compiler code. Fix fixes are here: I'm new to the code base but the breakages as far as I can tell are:
|
There are some other issues that come up when I tried pulling in PR #2641. Not sure if the closure team is pulling that in to the next release. Without my patches it fails silently and generates a tiny bundle. With my patches it still fails silently and generates a bundle with |
Yes, I'm working on getting the google repo into a state where 2641 can be submitted. Hopefully will be done by the end of this week. |
@gregmagolan I have a large set of changes queued up for CommonJS processing. However, they all depend on #2641 so you won't see any movement there until it lands. |
@ChadKillingsworth That's good to hear. Are they on your fork? I can build them locally and try the changes out with https://github.com/angular/closure-demo |
@gregmagolan You can test with this JAR: https://github.com/ChadKillingsworth/closure-compiler-npm/blob/webpack/compiler.jar But no, the code is still being cleaned up and targeted for separate PRs. |
The ideal test, in my mind, is to reproduce the angular/closure-demo CI: an integration test against the closure.jar that fetches a fixed Angular release, builds an Angular app with our recipe, and runs a protractor test that the app still works. That gives the most realistic coverage of bugs, and is obvious what it tests and how it reproduces a user's reported problem - but I'd also understand if that fixure sounds too large/slow for you. The next closest thing is to take that example apart one step: figure out what closure compiler command line we call, what the input .JS files look like in this Angular app, and hard-code them as a golden test. Then we have to accept a new golden output file from time-to-time, which we would do by confirming the new output bundle still works. We could take it apart even further, but then I'm not sure we know what the right assertions are. The app breaks in new and interesting ways every time. |
Can you sync the closure-demo into google3? I'd prefer a test that fails when we try to submit a compiler change, to one that fails when we do a release, which may be weeks after the actual breaking change went in. |
I don't think it's possible, this relies on different output from
ts_library (using ES Modules) and different filesystem layout (node module
resolution)
…On Wed, Sep 27, 2017 at 11:50 AM Tyler Breisacher ***@***.***> wrote:
Can you sync the closure-demo into google3? I'd prefer a test that fails
when we try to submit a compiler change, to one that fails when we do a
release, which may be weeks after the actual breaking change went in.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2664 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAC5I4S5qqDgE275sXtqR85S_XzopaCsks5smpjzgaJpZM4PjI6D>
.
|
We have an internal test that confirms that a change won't break the opensource maven build.
|
@ChadKillingsworth I opened up two PR against the ChadKillingsworth#1 Can you take a look and let me know what you think? |
FYI we just fixed Angular to reference a released closure compiler rather than a fork: |
@alexeagle Once all my webpack PRs land, we are considering doing this in the https://github.com/webpack-contrib/closure-webpack-plugin repo - possibly using the angular demo as the test case. CC @d3viant0ne |
@alexeagle - I've got a CI setup that can accommodate You can find me in the Webpack slack or the flex-layout room in the Angular slack if you want / need to discuss it further. |
Angular is selling our users on Closure Compiler - as of Angular 4 we provide some support at http://github.com/angular/closure-demo
It's also a key part of our "develop like google does" story: http://g.co/ng/abc
However, we frequently find that closure releases are broken. Currently 20170409 is the latest release that works with Angular - however it won't work with Angular 5 because we need some recent fixes to node module resolution.
We should ensure that a green build of closure will work with Angular.
we should be able to copy what closure-library does to run their end-to-end tests externally, and use that to run the closure compiler IntegrationTest (currently it only runs in google-internal)
/cc @gregmagolan @MatrixFrog
The text was updated successfully, but these errors were encountered: