Skip to content

Library import 2 #639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 3 additions & 7 deletions build/conf/java.conf
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT {
.ALIASES=SRCS=_SRCS_NO_GLOBAL
.ALLOWED=EMBED_JAVA_VCS_INFO
.RESTRICTED=EXTERNAL_JAR
.GLOBAL=MAVEN_EXPORT_COORDS EXPORT_GRADLE_CLASSPATH
.GLOBAL=MAVEN_EXPORT_COORDS

PEERDIR(build/platform/java/jdk)
PEERDIR+=$JDK_RESOURCE_PEERDIR $EXTERNAL_JAVA_EXTRA_PEERDIR
Expand Down Expand Up @@ -440,7 +440,6 @@ module _JAR_BASE: _BARE_UNIT {
.ALLOWED=EMBED_JAVA_VCS_INFO DEPENDENCY_MANAGEMENT EXCLUDE
.DEFAULT_NAME_GENERATOR=TwoDirNames
.RESTRICTED=WITH_JDK RESOURCE RESOURCE_FILES
.GLOBAL=EXPORT_GRADLE_CLASSPATH

PEERDIR_TAGS=JAVA_PROTO JAVA_FBS JAVA_IDL DLL JAR_COMPILATION __EMPTY__

Expand Down Expand Up @@ -506,8 +505,6 @@ JAVA_CONTRIB_SEM= \
consumer-classpath $EXPORT_GRADLE_CLASSPATH \
&& consumer-jar ${MODDIR}/${REALPRJNAME}.jar \
&& consumer-type contrib \
&& peers_closure $MANAGED_PEERS_CLOSURE \
&& peers_closure_coords $EXPORT_GRADLE_CLASSPATH_GLOBAL \
&& IGNORED

# tag:java-specific
Expand All @@ -516,7 +513,7 @@ module JAVA_CONTRIB: _JAR_BASE {
.PEERDIR_POLICY=as_include
.SEM=JAVA_CONTRIB_SEM
.FINAL_TARGET=yes
.GLOBAL=MAVEN_EXPORT_COORDS EXPORT_GRADLE_CLASSPATH
.GLOBAL=MAVEN_EXPORT_COORDS

when ($JAR_RESOURCE_ID) {
FETCH_TARGET_JAR= && $_FETCH_CONTRIB($JAR_RESOURCE_ID ${BINDIR}/${MODULE_PREFIX}${REALPRJNAME}${MODULE_SUFFIX})
Expand Down Expand Up @@ -868,7 +865,6 @@ BUILD_JAR_SEM= \
&& consumer-classpath $EXPORT_GRADLE_CLASSPATH \
&& consumer-jar ${MODDIR}/${REALPRJNAME}.jar \
&& consumer-type library \
&& excludes_rules $EXCLUDE_VALUE \
$_KOTLIN_SEM \
$_JAR_MAIN_SEM \
$_GRADLE_EXPORT_PUBLISHING_SEM \
Expand All @@ -894,7 +890,7 @@ module JAR_LIBRARY: _COMPILABLE_JAR_BASE {
.FINAL_TARGET=yes
.ALIASES=JAVA_SRCS=FULL_JAVA_SRCS ANNOTATION_PROCESSOR=JAR_ANNOTATION_PROCESSOR
.RESTRICTED=EXTERNAL_JAR
.GLOBAL=MAVEN_EXPORT_COORDS EXPORT_GRADLE_CLASSPATH
.GLOBAL=MAVEN_EXPORT_COORDS
MODULE_SUFFIX=.jar

PEERDIR(build/platform/java/jdk)
Expand Down
10 changes: 10 additions & 0 deletions build/conf/proto.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ CPP_PROTO_OUTS=
CPP_PROTO_OUTS_SEM=
CPP_PROTO_SUFFIXES=.pb.h .pb.cc
CPP_PROTO_PLUGINS=
CPP_PROTO_NO_DBGINFO=no

# tag:proto tag:cpp-specific
CPP_EV_OPTS=--plugin=protoc-gen-event2cpp=${tool:"tools/event2cpp"} --event2cpp_out=$ARCADIA_BUILD_ROOT -I=$ARCADIA_ROOT/library/cpp/eventlog
Expand All @@ -50,6 +51,14 @@ JAVA_PROTO_ARGS=
# tag:proto tag:python-specific
OPTIMIZE_PY_PROTOS_FLAG=no

# tag:proto
### @usage: CPP_PROTOLIBS_DEBUG_INFO()
###
### Eqvivalent to NO_DEBUG_INFO() macro if the flag CPP_PROTO_NO_DBGINFO=yes
macro CPP_PROTOLIBS_DEBUG_INFO() {
SET(NO_DEBUGINFO $CPP_PROTO_NO_DBGINFO)
}

# tag:internal
### @usage: _ORDER_ADDINCL([BUILD ...] [SOURCE ...] Args...) # internal
###
Expand Down Expand Up @@ -638,6 +647,7 @@ multimodule PROTO_LIBRARY {
ENABLE(CPP_PROTO)
ENABLE(GEN_PROTO)
NO_CLANG_TIDY()
CPP_PROTOLIBS_DEBUG_INFO()
SET(PEERDIR_TAGS CPP_PROTO)

when ($BUILD_PROTO_AS_EVLOG == "yes" && $USE_VANILLA_PROTOC == "yes") {
Expand Down
7 changes: 4 additions & 3 deletions build/export_generators/gradle/build.gradle.kts.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ dependencies {
{% for library in target.consumer -%}
{% set classpath = library.classpath -%}
{% if targets|selectattr("app_main_class") -%}
{% if target.lib_excludes is defined and target.lib_excludes[classpath]|length > 0 -%}
{% if library.excludes.consumer is defined %}
implementation({{ classpath }}) {
{% for exclude in target.lib_excludes[classpath] -%}
exclude group: '{{ exclude[0] }}', module: '{{ exclude[1] }}'
{% for exclude in library.excludes.consumer -%}
{% set classpath_parts = exclude.classpath.split(':') -%}
exclude group: '{{ classpath_parts[0] }}', module: '{{ classpath_parts[1] }}'
{% endfor -%}
}
{% else -%}
Expand Down
3 changes: 0 additions & 3 deletions build/export_generators/gradle/generator.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ add_vcs_info_to_mf="bool"
junit4_test="flag"
junit5_test="flag"
app_main_class="str"
peers_closure="list"
peers_closure_coords="list"
excludes_rules="list"

publish="flag"
publish_group="str"
Expand Down
7 changes: 4 additions & 3 deletions build/export_generators/ide-gradle/build.gradle.kts.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ dependencies {
{% for library in target.consumer -%}
{% set classpath = library.classpath -%}
{% if targets|selectattr("app_main_class") -%}
{% if target.lib_excludes is defined and target.lib_excludes[classpath]|length > 0 -%}
{% if library.excludes.consumer is defined %}
implementation({{ classpath }}) {
{% for exclude in target.lib_excludes[classpath] -%}
exclude group: '{{ exclude[0] }}', module: '{{ exclude[1] }}'
{% for exclude in library.excludes.consumer -%}
{% set classpath_parts = exclude.classpath.split(':') -%}
exclude group: '{{ classpath_parts[0] }}', module: '{{ classpath_parts[1] }}'
{% endfor -%}
}
{% else -%}
Expand Down
3 changes: 0 additions & 3 deletions build/export_generators/ide-gradle/generator.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ add_vcs_info_to_mf="bool"
junit4_test="flag"
junit5_test="flag"
app_main_class="str"
peers_closure="list"
peers_closure_coords="list"
excludes_rules="list"
jar_source_set="list"

publish="flag"
Expand Down
6 changes: 3 additions & 3 deletions build/external_resources/yexport/resources.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"by_platform": {
"darwin": {
"uri": "sbr:5534004877"
"uri": "sbr:5562968267"
},
"darwin-arm64": {
"uri": "sbr:5534041285"
"uri": "sbr:5562965675"
},
"linux": {
"uri": "sbr:5534030737"
"uri": "sbr:5562947428"
}
}
}
18 changes: 15 additions & 3 deletions build/mapping.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"5424038053": "https://devtools-registry.s3.yandex.net/5424038053",
"5424051723": "https://devtools-registry.s3.yandex.net/5424051723",
"5543659225": "https://devtools-registry.s3.yandex.net/5543659225",
"5560184603": "https://devtools-registry.s3.yandex.net/5560184603",
"5553311553": "https://devtools-registry.s3.yandex.net/5553311553",
"5554110935": "https://devtools-registry.s3.yandex.net/5554110935",
"5554115224": "https://devtools-registry.s3.yandex.net/5554115224",
Expand Down Expand Up @@ -94,6 +95,7 @@
"5530946535": "https://devtools-registry.s3.yandex.net/5530946535",
"5545693767": "https://devtools-registry.s3.yandex.net/5545693767",
"5545709989": "https://devtools-registry.s3.yandex.net/5545709989",
"5559549864": "https://devtools-registry.s3.yandex.net/5559549864",
"4307890075": "https://devtools-registry.s3.yandex.net/4307890075",
"5517245192": "https://devtools-registry.s3.yandex.net/5517245192",
"4307901240": "https://devtools-registry.s3.yandex.net/4307901240",
Expand All @@ -111,12 +113,15 @@
"5486584798": "https://devtools-registry.s3.yandex.net/5486584798",
"5498749381": "https://devtools-registry.s3.yandex.net/5498749381",
"5534092912": "https://devtools-registry.s3.yandex.net/5534092912",
"5562971772": "https://devtools-registry.s3.yandex.net/5562971772",
"5486590469": "https://devtools-registry.s3.yandex.net/5486590469",
"5498750509": "https://devtools-registry.s3.yandex.net/5498750509",
"5534043120": "https://devtools-registry.s3.yandex.net/5534043120",
"5562958333": "https://devtools-registry.s3.yandex.net/5562958333",
"5486590393": "https://devtools-registry.s3.yandex.net/5486590393",
"5498735180": "https://devtools-registry.s3.yandex.net/5498735180",
"5534059422": "https://devtools-registry.s3.yandex.net/5534059422",
"5562961825": "https://devtools-registry.s3.yandex.net/5562961825",
"5476908047": "https://devtools-registry.s3.yandex.net/5476908047",
"5509380757": "https://devtools-registry.s3.yandex.net/5509380757",
"5550834592": "https://devtools-registry.s3.yandex.net/5550834592",
Expand All @@ -132,7 +137,8 @@
"5476896707": "https://devtools-registry.s3.yandex.net/5476896707",
"5509388614": "https://devtools-registry.s3.yandex.net/5509388614",
"5550838970": "https://devtools-registry.s3.yandex.net/5550838970",
"2980468199": "https://devtools-registry.s3.yandex.net/2980468199"
"2980468199": "https://devtools-registry.s3.yandex.net/2980468199",
"5562224408": "https://devtools-registry.s3.yandex.net/5562224408"
},
"resources_descriptions": {
"2214720943": "Clang 11.0.0 for darwin-arm64",
Expand Down Expand Up @@ -171,6 +177,7 @@
"5424038053": "OTHER_RESOURCE-none-1.21.3-y_go1.21.3.linux-arm64.tar.gz",
"5424051723": "OTHER_RESOURCE-none-1.21.3-y_go1.21.3.windows-amd64.tar.gz",
"5543659225": "OTHER_RESOURCE-none-none-clang-darwin-arm64.tgz",
"5560184603": "OTHER_RESOURCE-none-none-clang-mingw64.tgz",
"5553311553": "OTHER_RESOURCE-none-none-clang-new-darwin-arm64.tgz",
"5554110935": "OTHER_RESOURCE-none-none-clang-new-darwin-x86_64.tgz",
"5554115224": "OTHER_RESOURCE-none-none-clang-new-linux-aarch64.tgz",
Expand Down Expand Up @@ -228,6 +235,7 @@
"5530946535": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
"5545693767": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
"5545709989": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
"5559549864": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
"4307890075": "flake8_linter for linux",
"5517245192": "flake8_linter for linux",
"4307901240": "flake8_linter for linux-aarch64",
Expand All @@ -245,12 +253,15 @@
"5486584798": "yexport for darwin",
"5498749381": "yexport for darwin",
"5534092912": "yexport for darwin",
"5562971772": "yexport for darwin",
"5486590469": "yexport for darwin-arm64",
"5498750509": "yexport for darwin-arm64",
"5534043120": "yexport for darwin-arm64",
"5562958333": "yexport for darwin-arm64",
"5486590393": "yexport for linux",
"5498735180": "yexport for linux",
"5534059422": "yexport for linux",
"5562961825": "yexport for linux",
"5476908047": "ymake for darwin",
"5509380757": "ymake for darwin",
"5550834592": "ymake for darwin",
Expand All @@ -266,8 +277,9 @@
"5476896707": "ymake.exe for win32-clang-cl",
"5509388614": "ymake.exe for win32-clang-cl",
"5550838970": "ymake.exe for win32-clang-cl",
"2980468199": "ytexec for linux"
"2980468199": "ytexec for linux",
"5562224408": "ytexec for linux"
},
"resources_info": {},
"tasks": {}
}
}
2 changes: 1 addition & 1 deletion build/platform/clang/clang16.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"uri": "sbr:5550376885"
},
"win32-x86_64": {
"uri": "sbr:4597657641"
"uri": "sbr:5560184603"
}
}
}
20 changes: 10 additions & 10 deletions build/platform/test_tool/host.ya.make.inc
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5530946966)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5530945085)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5559522450)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5559535346)
ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5530946287)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5530944412)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5559521542)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5559534336)
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5530948376)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5530946535)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5559524010)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5559537477)
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5530945697)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5530943651)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5559520978)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5559533477)
ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5530947626)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5530945871)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5559523230)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5559536195)

ENDIF()
20 changes: 10 additions & 10 deletions build/platform/test_tool/host_os.ya.make.inc
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5545693048)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5545693048)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5559548658)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5559548658)
ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5545692674)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5545692674)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5559548099)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5559548099)
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5545693767)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5545693767)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5559549864)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5559549864)
ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5545692313)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5545692313)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5559547357)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5559547357)
ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5545693355)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5545693355)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:5559549352)
DECLARE_EXTERNAL_RESOURCE(TEST_TOOL3_HOST sbr:5559549352)

ENDIF()
1 change: 0 additions & 1 deletion build/plugins/java.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,4 +483,3 @@ def on_setup_project_coords_if_needed(unit, *args):
else:
value = 'project(\\":{}\\")'.format(project_dir.replace('/', ':'))
unit.set(['EXPORT_GRADLE_CLASSPATH', value])
unit.set(['EXPORT_GRADLE_CLASSPATH_GLOBAL', value])
5 changes: 5 additions & 0 deletions build/plugins/res.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ def onresource_files(unit, *args):
key = 'resfs/file/' + (
dest or (prefix + (path if not prefix_to_strip else remove_prefix(path, prefix_to_strip)))
)
if key in res:
unit.message(
['warn', "Dublicated resource file {} in RESOURCE_FILES() macro. Skipped it.".format(path)]
)
continue
src = 'resfs/src/{}={}'.format(key, rootrel_arc_src(path, unit))
res += ['-', src, path, key]

Expand Down
Loading