-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reducing memory footprint by excluding unused rule attributes (#505)
- Loading branch information
1 parent
75959ba
commit 6de8135
Showing
10 changed files
with
103 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...esforce.bazel.sdk/src/com/salesforce/bazel/sdk/command/querylight/BazelRuleAttribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/*- | ||
* Copyright (c) 2024 Salesforce and others. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Salesforce - adapted from M2E, JDT or other Eclipse project | ||
*/ | ||
package com.salesforce.bazel.sdk.command.querylight; | ||
|
||
import java.util.Arrays; | ||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
|
||
/** | ||
* Rule attribute names we depend on during sync | ||
*/ | ||
public enum BazelRuleAttribute { | ||
|
||
SRCS("srcs"), | ||
EXPORTS("exports"), | ||
TEST_ONLY("testonly"), | ||
JAVAC_OPTS("javacopts"), | ||
RESOURCES("resources"), | ||
RESOURCES_STRIP_PREFIX("resource_strip_prefix"), | ||
STRIP_PREFIX("strip_prefix"), | ||
PLUGINS("plugins"), | ||
JARS("jars"), | ||
SRC_JAR("srcjar"), | ||
TAGS("tags"), | ||
NAME("name"), | ||
VISIBILITY("visibility"), | ||
PATH("path"), | ||
DEPS("deps"); | ||
|
||
public static final Set<String> KNOWN_ATTRIBUTES = | ||
Arrays.stream(BazelRuleAttribute.values()).map(attr -> attr.key).collect(Collectors.toSet()); | ||
|
||
public final String key; | ||
|
||
BazelRuleAttribute(String key) { | ||
this.key = key; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters