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

Commit ddd20eb

Browse files
committed
emit a header comment
By tagging every clutz-generated file with a comment, tsickle can then use this to identify clutz output. Note that emitComment() output doesn't show up in tests, so this doesn't affect any tests. I think it's not very valuable to have this test baselines include this comment anyway.
1 parent 4c374c0 commit ddd20eb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/com/google/javascript/clutz/DeclarationGenerator.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -450,11 +450,15 @@ private String getNamespace(String input) {
450450
}
451451

452452
String produceDts(Depgraph depgraph) {
453+
out = new StringWriter();
454+
455+
// Note: the specific emit of this header is depended upon by tsickle.
456+
emitComment("generated by clutz.");
457+
453458
// Tree sets for consistent order.
454459
TreeSet<String> provides = new TreeSet<>();
455460
Set<String> rewrittenProvides = new TreeSet<>();
456461
Set<String> transitiveProvides = new TreeSet<>();
457-
out = new StringWriter();
458462

459463
for (CompilerInput compilerInput : compiler.getInputsById().values()) {
460464
if (shouldSkipSourceFile(compilerInput.getSourceFile())) {

0 commit comments

Comments
 (0)