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

Commit 0a5eadd

Browse files
authored
Remove googProvides flag. (#914)
This is no longer needed and it was never really used. We use depgraphs to get the info of whether something was a goog.module or goog.provide.
1 parent fb2f4cf commit 0a5eadd

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,6 @@ public int parseArguments(Parameters params) throws CmdLineException {
141141
)
142142
String skipEmitRegExp = null;
143143

144-
@Option(
145-
name = "--googProvides",
146-
usage =
147-
"file containing a list of namespaces names that we know come from goog.provides (not goog.modules)"
148-
)
149-
String googProvidesFile = null;
150-
151144
@Option(
152145
name = "--collidingProvides",
153146
usage = "file containing a list of names that we know conflict with namespaces"
@@ -180,7 +173,6 @@ public int parseArguments(Parameters params) throws CmdLineException {
180173
// TODO(martinprobst): Remove when internal Google is upgraded to a more recent args4j
181174
// library that supports Pattern arguments.
182175
Pattern skipEmitPattern;
183-
Set<String> knownGoogProvides = new HashSet<>();
184176
Set<String> collidingProvides = new HashSet<>();
185177

186178
public CompilerOptions getCompilerOptions() {
@@ -282,13 +274,6 @@ public CompilerOptions getCompilerOptions() {
282274
throw new CmdLineException(parser, "No files or externs were given");
283275
}
284276

285-
if (googProvidesFile != null) {
286-
try {
287-
knownGoogProvides.addAll(Files.readLines(new File(googProvidesFile), UTF_8));
288-
} catch (IOException e) {
289-
throw new RuntimeException("Error reading goog provides file " + googProvidesFile, e);
290-
}
291-
}
292277
if (collidingProvidesFile != null) {
293278
try {
294279
collidingProvides.addAll(Files.readLines(new File(collidingProvidesFile), UTF_8));

src/test/java/com/google/javascript/clutz/OptionsTest.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,6 @@ public void testClosureEnvCustom() throws Exception {
162162
.isEqualTo(CompilerOptions.Environment.CUSTOM);
163163
}
164164

165-
@Test
166-
public void testGoogProvides() throws Exception {
167-
Options opts =
168-
new Options(
169-
new String[] {
170-
"foo.js",
171-
"--googProvides",
172-
DeclarationGeneratorTest.getTestInputFile("test_goog_provides").toFile().toString()
173-
});
174-
assertThat(opts.knownGoogProvides).containsExactly("foo.bar", "baz.quux");
175-
}
176-
177165
@Test
178166
public void testPartialInputIgnoresDepgraphRootExternsIfNotPassedToExterns() throws Exception {
179167
// Due to "exported" libraries, what the depgraph considers "root" can be incorrect for the

0 commit comments

Comments
 (0)