Skip to content
This repository was archived by the owner on Feb 23, 2022. It is now read-only.
This repository was archived by the owner on Feb 23, 2022. It is now read-only.

Generate Source Mapping Error when a property value contains comma #11

@edgesite

Description

@edgesite

What steps will reproduce the problem?
1.Clone the latest closure-stylesheets and compile
2.specify output-source-map when building gss

java -jar build/closure-stylesheets.jar --allow-unrecognized-properties --output-renaming-map-format CLOSURE_UNCOMPILED --rename CLOSURE --output-renaming-map renaming_map.js --output-source-map test.source.map --output-file test.css test.gss

What is the expected output? What do you see instead?
I got an error:

Compiler internal error: null
java.lang.IllegalStateException
at com.google.common.base.Preconditions.checkState(Preconditions.java:133)
at com.google.common.css.compiler.passes.DefaultGssSourceMapGenerator.endSourceMapping(DefaultGssSourceMapGenerator.java:157)
at com.google.common.css.compiler.passes.CodePrinter.leave(CodePrinter.java:103)
at com.google.common.css.compiler.passes.UniformVisitor.leaveImportBlock(UniformVisitor.java:266)
at com.google.common.css.compiler.ast.DefaultVisitController$RootVisitImportBlockState.doVisit(DefaultVisitController.java:387)
at com.google.common.css.compiler.ast.DefaultVisitController.startVisit(DefaultVisitController.java:2028)
at com.google.common.css.compiler.passes.CompactPrinter.runPass(CompactPrinter.java:473)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.parseAndPrint(DefaultCommandLineCompiler.java:127)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.compile(DefaultCommandLineCompiler.java:110)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.execute(DefaultCommandLineCompiler.java:149)
at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.executeJob(ClosureCommandLineCompiler.java:335)
at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.main(ClosureCommandLineCompiler.java:400)

What version of the product are you using? On what operating system?
Latest clone from github, mac os x and java 1.8

Please provide any additional information below.
I generated a gss file that contains comma in the property value and enable output-source-map both, then closure stylesheets throw an exception above.
i also generated a gss file(test2.gss) that not contains comma in the property value, then compile it using same parameter, it works fine.

test.gss:

.test {
font-family: Helvetica, Tahoma;
}

test2.gss

.test2 {
font-family: Helvetica;
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions