closure-stylesheets icon indicating copy to clipboard operation
closure-stylesheets copied to clipboard

Support --allow-duplicate-declarations

Open pspeter3 opened this issue 9 years ago • 11 comments
trafficstars

When using CSS transform tools such as autoprefixer, the generated code can include duplicate declarations but not include the alternate annotation. This allows developers to opt out of the check during the dead code elimination pass.

pspeter3 avatar Jul 19 '16 18:07 pspeter3

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

googlebot avatar Jul 19 '16 18:07 googlebot

Will sign the CLA. This is a version of https://github.com/google/closure-stylesheets/pull/79 with a test for the default value and the required behavior. There are no tests that I could find easily for DuplicateDeclarations so I did not add to them. Happy to add tests if you point to where I should.

pspeter3 avatar Jul 19 '16 18:07 pspeter3

Hi there,

I can't think of a reasonable way of testing this, so I think your change is fine as-is. If you sign the CLA, then I'll pull the change internally and then push it back out.

Ian

iflan avatar Jul 19 '16 22:07 iflan

@iflan Is there a way to build and run this jar locally? Running mvn package does not work.

pspeter3 avatar Jul 20 '16 00:07 pspeter3

I'll try right now and get back to you.

iflan avatar Jul 20 '16 00:07 iflan

mvn package works for me from head. Here's how it ends:

[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ closure-stylesheets ---
[INFO] Building jar: /Users/flan/Projects/closure-stylesheets/target/closure-stylesheets-21060712-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.798 s
[INFO] Finished at: 2016-07-19T17:40:37-07:00
[INFO] Final Memory: 24M/302M
[INFO] ------------------------------------------------------------------------

iflan avatar Jul 20 '16 00:07 iflan

Agreed. Running that jar however does not have a main attribute in the manifest file. What process is used to build the releases?

pspeter3 avatar Jul 20 '16 00:07 pspeter3

I signed the CLA

pspeter3 avatar Jul 20 '16 00:07 pspeter3

So true! Let me fix that right now.

iflan avatar Jul 20 '16 00:07 iflan

I've created a branch called mvn-runnable-jar that has the changes. You can create the JAR with:

mvn clean compile assembly:single

I'm not committing that to master yet because I need to get it reviewed internally. Also, we need to decide whether this should be the default artifact or not. But I'm punting that decision until tomorrow.

Also, you still don't show up as having signed the CLA. This could be because you used a different email address or GitHub username. Please verify that the email address in the git log is the same as the one you signed the CLA with.

Thanks for your help!

Ian

iflan avatar Jul 20 '16 02:07 iflan

In light of this PR is mine https://github.com/google/closure-stylesheets/pull/79 and this other past PR https://github.com/google/closure-stylesheets/pull/75 now irrelevant?

BradMclain avatar Oct 11 '16 01:10 BradMclain