Skip to content

Commit

Permalink
Merge branch 'bazelbuild:master' into release_test
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jun 30, 2023
2 parents 75051c6 + 1a896be commit cfad977
Show file tree
Hide file tree
Showing 92 changed files with 1,167 additions and 2,611 deletions.
11 changes: 5 additions & 6 deletions .github/ISSUE_TEMPLATE/mirror_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ body:
- type: markdown
attributes:
value: >
**Attention:** if the archive you're trying to mirror is a GitHub release archive,
please use URLs of the form `https://github.com/$USER/$REPO/archive/refs/tags/$TAG`,
instead of the form without the `refs/tags/` part. The latter is *not* guaranteed to
have a stable hash (see
https://github.com/bazel-contrib/SIG-rules-authors/issues/11#issuecomment-1029861300
for more details).
**Attention:** if the archive you're trying to mirror is from GitHub,
please use URLs in the form of `https://github.com/$USER/$REPO/releases/download/...` if available.
If you are the project maintainer, you should create and upload such an release archive.
GitHub doesn't guarantee a stable checksum of source archives in the form of `https://github.com/<org>/<repo>/archive/...`, which are generated on demand.
Check [GitHub Archive Checksum Outage](https://blog.bazel.build/2023/02/15/github-archive-checksum.html) for more details.
- type: textarea
id: urls
attributes:
Expand Down
5 changes: 5 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ pkg_tar(
visibility = ["//:__subpackages__"],
)

exports_files(
["maven_install.json"],
visibility = ["//tools/compliance:__pkg__"],
)

py_binary(
name = "combine_distfiles",
srcs = ["combine_distfiles.py"],
Expand Down
9 changes: 5 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -473,14 +473,13 @@ maven_install(
"io.netty:netty-transport-native-unix-common:jar:linux-x86_64:4.1.93.Final",
"io.netty:netty-transport-native-unix-common:jar:osx-aarch_64:4.1.93.Final",
"io.netty:netty-transport-native-unix-common:jar:osx-x86_64:4.1.93.Final",
"io.netty:netty-transport-sctp:4.1.93.Final",
"io.netty:netty-transport:4.1.93.Final",
"io.reactivex.rxjava3:rxjava:3.1.2",
"javax.activation:javax.activation-api:1.2.0",
"javax.annotation:javax.annotation-api:1.3.2",
"javax.inject:javax.inject:1",
"net.bytebuddy:byte-buddy-agent:1.11.13",
"net.bytebuddy:byte-buddy:1.11.13",
"net.bytebuddy:byte-buddy-agent:1.14.5",
"net.bytebuddy:byte-buddy:1.14.5",
"org.apache.commons:commons-compress:1.19",
"org.apache.commons:commons-pool2:2.8.0",
"org.apache.tomcat:tomcat-annotations-api:8.0.5",
Expand Down Expand Up @@ -559,7 +558,8 @@ maven_install(
"com.google.protobuf:protobuf-java",
"com.google.protobuf:protobuf-javalite",
],
fail_if_repin_required = False,
# Don't forget to change this to back to True before submitting your change.
fail_if_repin_required = True,
maven_install_json = "//:maven_install.json",
repositories = [
"https://repo1.maven.org/maven2",
Expand All @@ -583,6 +583,7 @@ maven_install(
"com.android.tools:common:30.1.3",
"com.android.tools:repository:30.1.3",
],
# Don't forget to change this to back to True before submitting your change.
fail_if_repin_required = True,
maven_install_json = "//src/tools/android:maven_android_install.json",
repositories = [
Expand Down
45 changes: 13 additions & 32 deletions maven_install.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
"__INPUT_ARTIFACTS_HASH": -482172833,
"__RESOLVED_ARTIFACTS_HASH": -552166642,
"__INPUT_ARTIFACTS_HASH": 307745718,
"__RESOLVED_ARTIFACTS_HASH": -1204291120,
"artifacts": {
"aopalliance:aopalliance": {
"shasums": {
Expand Down Expand Up @@ -475,12 +475,6 @@
},
"version": "4.1.93.Final"
},
"io.netty:netty-transport-sctp": {
"shasums": {
"jar": "9021704f3ad2758d3d2728d335fcd16df8390bbcd9cfb64ee24e2024d4cd5a0f"
},
"version": "4.1.93.Final"
},
"io.opencensus:opencensus-api": {
"shasums": {
"jar": "f1474d47f4b6b001558ad27b952e35eda5cc7146788877fc52938c6eba24b382"
Expand Down Expand Up @@ -537,15 +531,15 @@
},
"net.bytebuddy:byte-buddy": {
"shasums": {
"jar": "e29fa75b903432ac64d05c18c19d0e3b9026e74abda52bbd6f9065e55f4a29f5"
"jar": "e99761a526df0fefbbd3fe14436b0f953000cdfa5151dc63c0b18d37d9c46f1c"
},
"version": "1.11.13"
"version": "1.14.5"
},
"net.bytebuddy:byte-buddy-agent": {
"shasums": {
"jar": "49b43b0d10f8bb1d800d56137bdf0f44628412ebe1fbd804e45f363d495860fa"
"jar": "55f19862b870f5d85890ba5386b1b45e9bbc88d5fe1f819abe0c788b4929fa6b"
},
"version": "1.11.13"
"version": "1.14.5"
},
"org.apache.commons:commons-compress": {
"shasums": {
Expand Down Expand Up @@ -603,15 +597,15 @@
},
"org.mockito:mockito-core": {
"shasums": {
"jar": "75d4b14ba7aef836e92ba7b2d53ca7d6b215dd7db5625afbc39252f1358835fe"
"jar": "b1689b06617ea01fd777bfaedbdde512faf083d639a049f79b388d5a4e96d2e5"
},
"version": "3.12.4"
"version": "5.4.0"
},
"org.objenesis:objenesis": {
"shasums": {
"jar": "03d960bd5aef03c653eb000413ada15eb77cdd2b8e4448886edf5692805e35f3"
"jar": "02dfd0b0439a5591e35b708ed2f5474eb0948f53abf74637e959b8e4ef69bfeb"
},
"version": "3.2"
"version": "3.3"
},
"org.ow2.asm:asm": {
"shasums": {
Expand Down Expand Up @@ -1062,12 +1056,6 @@
"io.netty:netty-common",
"io.netty:netty-transport"
],
"io.netty:netty-transport-sctp": [
"io.netty:netty-buffer",
"io.netty:netty-codec",
"io.netty:netty-common",
"io.netty:netty-transport"
],
"io.opencensus:opencensus-api": [
"io.grpc:grpc-context"
],
Expand Down Expand Up @@ -1652,12 +1640,6 @@
"io.netty:netty-transport-native-unix-common:jar:osx-x86_64": [
"io.netty.channel.unix"
],
"io.netty:netty-transport-sctp": [
"io.netty.channel.sctp",
"io.netty.channel.sctp.nio",
"io.netty.channel.sctp.oio",
"io.netty.handler.codec.sctp"
],
"io.opencensus:opencensus-api": [
"io.opencensus.common",
"io.opencensus.internal",
Expand Down Expand Up @@ -1802,11 +1784,13 @@
"net.bytebuddy.pool",
"net.bytebuddy.utility",
"net.bytebuddy.utility.dispatcher",
"net.bytebuddy.utility.nullability",
"net.bytebuddy.utility.privilege",
"net.bytebuddy.utility.visitor"
],
"net.bytebuddy:byte-buddy-agent": [
"net.bytebuddy.agent"
"net.bytebuddy.agent",
"net.bytebuddy.agent.utility.nullability"
],
"org.apache.commons:commons-compress": [
"org.apache.commons.compress",
Expand Down Expand Up @@ -2005,7 +1989,6 @@
"org.mockito.internal.invocation.finder",
"org.mockito.internal.invocation.mockref",
"org.mockito.internal.junit",
"org.mockito.internal.junit.util",
"org.mockito.internal.listeners",
"org.mockito.internal.matchers",
"org.mockito.internal.matchers.apachecommons",
Expand Down Expand Up @@ -2033,7 +2016,6 @@
"org.mockito.mock",
"org.mockito.plugins",
"org.mockito.quality",
"org.mockito.runners",
"org.mockito.session",
"org.mockito.stubbing",
"org.mockito.verification"
Expand Down Expand Up @@ -2181,7 +2163,6 @@
"io.netty:netty-transport-native-unix-common:jar:linux-x86_64",
"io.netty:netty-transport-native-unix-common:jar:osx-aarch_64",
"io.netty:netty-transport-native-unix-common:jar:osx-x86_64",
"io.netty:netty-transport-sctp",
"io.opencensus:opencensus-api",
"io.opencensus:opencensus-contrib-http-util",
"io.perfmark:perfmark-api",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ private void readEntry() throws IOException {

String name = new String(filename, "UTF-8");
for (int i = 0; i < filename.length; i++) {
if ((filename[i] < ' ') || (filename[i] > 127)) {
if ((filename[i] < ' ')) {
warn(entryDesc + ": file name has unexpected non-ascii characters");
}
}
Expand Down
1 change: 0 additions & 1 deletion src/jdeps_modules.golden
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ java.naming
java.sql
java.xml
jdk.management
jdk.sctp
jdk.unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public PersistentIndexMap(Path mapFile, Path journalFile, Clock clock) throws IO
@Override
protected boolean updateJournal() {
long time = clock.nanoTime();
if (SAVE_INTERVAL_NS == 0 || time > nextUpdate) {
if (SAVE_INTERVAL_NS == 0L || time > nextUpdate) {
nextUpdate = time + SAVE_INTERVAL_NS;
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.google.devtools.build.lib.packages.Attribute;
import com.google.devtools.build.lib.packages.AttributeMap;
import com.google.devtools.build.lib.packages.DependencyFilter;
import com.google.devtools.build.lib.packages.PackageArgs;
import com.google.devtools.build.lib.packages.Type;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
Expand Down Expand Up @@ -137,23 +138,8 @@ public void visitLabels(DependencyFilter filter, BiConsumer<Attribute, Label> co
}

@Override
public String getPackageDefaultHdrsCheck() {
return ruleAttributes.getPackageDefaultHdrsCheck();
}

@Override
public boolean isPackageDefaultHdrsCheckSet() {
return ruleAttributes.isPackageDefaultHdrsCheckSet();
}

@Override
public Boolean getPackageDefaultTestOnly() {
return ruleAttributes.getPackageDefaultTestOnly();
}

@Override
public String getPackageDefaultDeprecation() {
return ruleAttributes.getPackageDefaultDeprecation();
public PackageArgs getPackageArgs() {
return ruleAttributes.getPackageArgs();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private BaseRuleClasses() {}
new Attribute.ComputedDefault() {
@Override
public Object getDefault(AttributeMap rule) {
return rule.getPackageDefaultTestOnly();
return rule.getPackageArgs().defaultTestOnly();
}

@Override
Expand All @@ -82,7 +82,7 @@ public boolean resolvableWithRawAttributes() {
new Attribute.ComputedDefault() {
@Override
public Object getDefault(AttributeMap rule) {
return rule.getPackageDefaultDeprecation();
return rule.getPackageArgs().defaultDeprecation();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,14 +590,14 @@ private static void visitRule(
outgoingLabels,
rule,
RuleClass.COMPATIBLE_ENVIRONMENT_ATTR,
rule.getPackage().getDefaultCompatibleWith());
rule.getPackage().getPackageArgs().defaultCompatibleWith());
}
if (!rule.isAttributeValueExplicitlySpecified(RuleClass.RESTRICTED_ENVIRONMENT_ATTR)) {
addExplicitDeps(
outgoingLabels,
rule,
RuleClass.RESTRICTED_ENVIRONMENT_ATTR,
rule.getPackage().getDefaultRestrictedTo());
rule.getPackage().getPackageArgs().defaultRestrictedTo());
}

addToolchainDeps(toolchainContexts, outgoingLabels);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ private RuleContext(
}

private FeatureSet computeFeatures() {
FeatureSet pkg = rule.getPackage().getFeatures();
FeatureSet pkg = rule.getPackage().getPackageArgs().features();
FeatureSet rule =
attributes().has("features", Type.STRING_LIST)
? FeatureSet.parse(attributes().get("features", Type.STRING_LIST))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.google.devtools.build.lib.analysis.BlazeDirectories;
import com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider;
import com.google.devtools.build.lib.analysis.RuleDefinition;
Expand Down Expand Up @@ -157,7 +158,9 @@ public class BazelRepositoryModule extends BlazeModule {
private LockfileMode bazelLockfileMode = LockfileMode.OFF;
private List<String> allowedYankedVersions = ImmutableList.of();
private SingleExtensionEvalFunction singleExtensionEvalFunction;
private final ExecutorService repoFetchingWorkerThreadPool = Executors.newFixedThreadPool(100);
private final ExecutorService repoFetchingWorkerThreadPool =
Executors.newFixedThreadPool(
100, new ThreadFactoryBuilder().setNameFormat("repo-fetching-worker-%d").build());

@Nullable private CredentialModule credentialModule;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
import com.google.common.collect.ImmutableList;
import com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider;
import com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider.RuleSet;
import com.google.devtools.build.lib.bazel.rules.cpp.BazelCppSemantics;
import com.google.devtools.build.lib.bazel.rules.objc.BazelJ2ObjcLibraryRule;
import com.google.devtools.build.lib.rules.core.CoreRules;
import com.google.devtools.build.lib.rules.objc.J2ObjcAspect;
import com.google.devtools.build.lib.rules.objc.J2ObjcLibraryBaseRule;

/**
Expand All @@ -34,10 +32,7 @@ private J2ObjcRules() {

@Override
public void init(ConfiguredRuleClassProvider.Builder builder) {
J2ObjcAspect j2ObjcAspect = new J2ObjcAspect(builder, BazelCppSemantics.OBJC);

builder.addNativeAspectClass(j2ObjcAspect);
builder.addRuleDefinition(new J2ObjcLibraryBaseRule(j2ObjcAspect));
builder.addRuleDefinition(new J2ObjcLibraryBaseRule());
builder.addRuleDefinition(new BazelJ2ObjcLibraryRule());
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

package com.google.devtools.build.lib.bazel.rules.objc;

import com.google.devtools.build.lib.analysis.BaseRuleClasses;
import com.google.devtools.build.lib.analysis.RuleDefinition;
import com.google.devtools.build.lib.analysis.RuleDefinitionEnvironment;
import com.google.devtools.build.lib.packages.RuleClass;
Expand All @@ -34,7 +35,7 @@ public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env)
public Metadata getMetadata() {
return RuleDefinition.Metadata.builder()
.name("j2objc_library")
.factoryClass(BazelJ2ObjcLibrary.class)
.factoryClass(BaseRuleClasses.EmptyRuleConfiguredTargetFactory.class)
.ancestors(J2ObjcLibraryBaseRule.class, ObjcRuleClasses.CrosstoolRule.class)
.build();
}
Expand Down
Loading

0 comments on commit cfad977

Please sign in to comment.