Skip to content

Commit

Permalink
Import libs 3 (ydb-platform#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexv-smirnov authored and marsaly79 committed Dec 22, 2023
1 parent c73a73b commit b64e857
Show file tree
Hide file tree
Showing 52 changed files with 420 additions and 478 deletions.
22 changes: 22 additions & 0 deletions build/conf/java.conf
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ multimodule JAVA_PROGRAM {
}
}

### Usage JUNIT_TESTS_JAR(path/to/some/peer realname.jar)
###
### Specifies jar to search test suites and test cases. By default tests are
### searched in the jar compild by JTEST or JUNIT5 module sources. This macro
### allows to specify diferent jar to search tests.
###
### Only one jar file is used to search tests. If this macro invoked multiple
### times (which is not reccomended practice) only the last invocation will
### have effect.
###
### If this macro is used no test from the module build by current ya.make
### will be searched and executed.
macro JUNIT_TESTS_JAR(Dir, Jar) {
SET(UNITTEST_DIR $Dir)
PEERDIR($Dir)
SET(UNITTEST_MOD $Dir/$Jar)
}

BUILD_JUNIT5_JAR_SEM=$BUILD_JAR_SEM && junit5_test

multimodule JUNIT5 {
Expand Down Expand Up @@ -102,6 +120,7 @@ multimodule JUNIT5 {
.FINAL_TARGET=no
.DEFAULT_NAME_GENERATOR=FullPath
.SEM=BUILD_JUNIT5_JAR_SEM
.IGNORED=JUNIT_TESTS_JAR

PEERDIR+=devtools/junit5-runner
PEERDIR+=build/platform/java/jacoco-agent
Expand Down Expand Up @@ -157,6 +176,7 @@ multimodule JTEST {
.FINAL_TARGET=no
.DEFAULT_NAME_GENERATOR=FullPath
.SEM=BUILD_JUNIT4_JAR_SEM
.IGNORED=JUNIT_TESTS_JAR

SET(MODULE_TYPE JTEST)
DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8)
Expand Down Expand Up @@ -197,6 +217,7 @@ multimodule JTEST_FOR {
# |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path)
.IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION PROVIDES FEATURE_VERSION
.ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE
.RESTRICTED=JUNIT_TESTS_JAR
.PEERDIRSELF=JAR_COMPILATION
.SEM=PROGRAM_AND_TESTS_CP_COLLECTING_NODES_SEM

Expand All @@ -210,6 +231,7 @@ multimodule JTEST_FOR {
.FINAL_TARGET=no
.DEFAULT_NAME_GENERATOR=FullPath
.SEM=BUILD_JUNIT4_JAR_SEM
.RESTRICTED=JUNIT_TESTS_JAR

SET(MODULE_TYPE JTEST_FOR)
DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8)
Expand Down
10 changes: 5 additions & 5 deletions build/external_resources/ymake/public.resources.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"by_platform": {
"darwin": {
"uri": "sbr:5550834592"
"uri": "sbr:5569062376"
},
"darwin-arm64": {
"uri": "sbr:5550838146"
"uri": "sbr:5569072879"
},
"linux": {
"uri": "sbr:5550826871"
"uri": "sbr:5569070627"
},
"linux-aarch64": {
"uri": "sbr:5550843115"
"uri": "sbr:5569095361"
},
"win32-clang-cl": {
"uri": "sbr:5550838970"
"uri": "sbr:5569066861"
}
}
}
10 changes: 5 additions & 5 deletions build/external_resources/ymake/resources.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"by_platform": {
"darwin": {
"uri": "sbr:5550837873"
"uri": "sbr:5569055879"
},
"darwin-arm64": {
"uri": "sbr:5550841763"
"uri": "sbr:5569046692"
},
"linux": {
"uri": "sbr:5550823946"
"uri": "sbr:5569080477"
},
"linux-aarch64": {
"uri": "sbr:5550840880"
"uri": "sbr:5569058127"
},
"win32-clang-cl": {
"uri": "sbr:5550839664"
"uri": "sbr:5569069854"
}
}
}
16 changes: 15 additions & 1 deletion build/mapping.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"5523579199": "https://devtools-registry.s3.yandex.net/5523579199",
"5530948376": "https://devtools-registry.s3.yandex.net/5530948376",
"5545691160": "https://devtools-registry.s3.yandex.net/5545691160",
"5559524010": "https://devtools-registry.s3.yandex.net/5559524010",
"5486731632": "https://devtools-registry.s3.yandex.net/5486731632",
"5514350352": "https://devtools-registry.s3.yandex.net/5514350352",
"5514360398": "https://devtools-registry.s3.yandex.net/5514360398",
Expand All @@ -95,6 +96,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",
"5559537477": "https://devtools-registry.s3.yandex.net/5559537477",
"5559549864": "https://devtools-registry.s3.yandex.net/5559549864",
"4307890075": "https://devtools-registry.s3.yandex.net/4307890075",
"5517245192": "https://devtools-registry.s3.yandex.net/5517245192",
Expand Down Expand Up @@ -125,18 +127,23 @@
"5476908047": "https://devtools-registry.s3.yandex.net/5476908047",
"5509380757": "https://devtools-registry.s3.yandex.net/5509380757",
"5550834592": "https://devtools-registry.s3.yandex.net/5550834592",
"5569062376": "https://devtools-registry.s3.yandex.net/5569062376",
"5476891477": "https://devtools-registry.s3.yandex.net/5476891477",
"5509369518": "https://devtools-registry.s3.yandex.net/5509369518",
"5550838146": "https://devtools-registry.s3.yandex.net/5550838146",
"5569072879": "https://devtools-registry.s3.yandex.net/5569072879",
"5476896849": "https://devtools-registry.s3.yandex.net/5476896849",
"5509364024": "https://devtools-registry.s3.yandex.net/5509364024",
"5550826871": "https://devtools-registry.s3.yandex.net/5550826871",
"5569070627": "https://devtools-registry.s3.yandex.net/5569070627",
"5476895322": "https://devtools-registry.s3.yandex.net/5476895322",
"5509360013": "https://devtools-registry.s3.yandex.net/5509360013",
"5550843115": "https://devtools-registry.s3.yandex.net/5550843115",
"5569095361": "https://devtools-registry.s3.yandex.net/5569095361",
"5476896707": "https://devtools-registry.s3.yandex.net/5476896707",
"5509388614": "https://devtools-registry.s3.yandex.net/5509388614",
"5550838970": "https://devtools-registry.s3.yandex.net/5550838970",
"5569066861": "https://devtools-registry.s3.yandex.net/5569066861",
"2980468199": "https://devtools-registry.s3.yandex.net/2980468199",
"5562224408": "https://devtools-registry.s3.yandex.net/5562224408"
},
Expand Down Expand Up @@ -226,6 +233,7 @@
"5523579199": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"5530948376": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"5545691160": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"5559524010": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
"5486731632": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
"5514350352": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
"5514360398": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
Expand All @@ -235,6 +243,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",
"5559537477": "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",
Expand Down Expand Up @@ -265,21 +274,26 @@
"5476908047": "ymake for darwin",
"5509380757": "ymake for darwin",
"5550834592": "ymake for darwin",
"5569062376": "ymake for darwin",
"5476891477": "ymake for darwin-arm64",
"5509369518": "ymake for darwin-arm64",
"5550838146": "ymake for darwin-arm64",
"5569072879": "ymake for darwin-arm64",
"5476896849": "ymake for linux",
"5509364024": "ymake for linux",
"5550826871": "ymake for linux",
"5569070627": "ymake for linux",
"5476895322": "ymake for linux-aarch64",
"5509360013": "ymake for linux-aarch64",
"5550843115": "ymake for linux-aarch64",
"5569095361": "ymake for linux-aarch64",
"5476896707": "ymake.exe for win32-clang-cl",
"5509388614": "ymake.exe for win32-clang-cl",
"5550838970": "ymake.exe for win32-clang-cl",
"5569066861": "ymake.exe for win32-clang-cl",
"2980468199": "ytexec for linux",
"5562224408": "ytexec for linux"
},
"resources_info": {},
"tasks": {}
}
}
2 changes: 1 addition & 1 deletion build/platform/test_tool/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IF (TEST_TOOL3_HOST_LOCAL)
MESSAGE(WARNING Host test tool3 $TEST_TOOL3_HOST_LOCAL will be used)
ENDIF()

IF (OPENSOURCE)
IF (OPENSOURCE AND USE_OPENSOURCE_TEST_TOOL)
INCLUDE(host_os.ya.make.inc)
ELSE()
INCLUDE(host.ya.make.inc)
Expand Down
1 change: 1 addition & 0 deletions build/sysincl/darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
- CoreTelephony/CTTelephonyNetworkInfo.h
- CoreText/CoreText.h
- CoreVideo/CoreVideo.h
- DeviceCheck/DCAppAttestService.h
- Foundation/Foundation.h
- Foundation/NSException.h
- Foundation/NSString.h
Expand Down
2 changes: 2 additions & 0 deletions build/ymake.core.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ FORCE_COVERAGE_ENABLED=
FORCE_COVERAGE_DISABLED=
OBJADDE_LIB=
OBJADDE_LIB_GLOBAL=
TRUE=yes
FALSE=no

MODULE_PREFIX=
MODULE_SUFFIX=
Expand Down
9 changes: 9 additions & 0 deletions contrib/libs/poco/Foundation/include/Poco/UTF32Encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ class Foundation_API UTF32Encoding: public TextEncoding
int convert(int ch, unsigned char* bytes, int length) const;
int queryConvert(const unsigned char* bytes, int length) const;
int sequenceLength(const unsigned char* bytes, int length) const;

protected:
static int safeToInt(Poco::UInt32 value)
{
if (value <= 0x10FFFF)
return static_cast<int>(value);
else
return -1;
}

private:
bool _flipBytes;
Expand Down
42 changes: 21 additions & 21 deletions contrib/libs/poco/Foundation/src/UTF32Encoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ const char* UTF32Encoding::_names[] =

const TextEncoding::CharacterMap UTF32Encoding::_charMap =
{
/* 00 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* 10 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* 20 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* 30 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* 40 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* 50 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* 60 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* 70 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* 80 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* 90 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* a0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* b0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* c0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* d0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* e0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* f0 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
/* 00 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* 10 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* 20 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* 30 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* 40 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* 50 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* 60 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* 70 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* 80 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* 90 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* a0 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* b0 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* c0 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* d0 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* e0 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
/* f0 */ -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
};


Expand Down Expand Up @@ -118,7 +118,7 @@ const TextEncoding::CharacterMap& UTF32Encoding::characterMap() const
int UTF32Encoding::convert(const unsigned char* bytes) const
{
UInt32 uc;
unsigned char* p = (unsigned char*) &uc;
unsigned char* p = reinterpret_cast<unsigned char*>(&uc);
*p++ = *bytes++;
*p++ = *bytes++;
*p++ = *bytes++;
Expand All @@ -129,7 +129,7 @@ int UTF32Encoding::convert(const unsigned char* bytes) const
ByteOrder::flipBytes(uc);
}

return uc;
return safeToInt(uc);
}


Expand All @@ -138,7 +138,7 @@ int UTF32Encoding::convert(int ch, unsigned char* bytes, int length) const
if (bytes && length >= 4)
{
UInt32 ch1 = _flipBytes ? ByteOrder::flipBytes((UInt32) ch) : (UInt32) ch;
unsigned char* p = (unsigned char*) &ch1;
unsigned char* p = reinterpret_cast<unsigned char*>(&ch1);
*bytes++ = *p++;
*bytes++ = *p++;
*bytes++ = *p++;
Expand All @@ -155,14 +155,14 @@ int UTF32Encoding::queryConvert(const unsigned char* bytes, int length) const
if (length >= 4)
{
UInt32 uc;
unsigned char* p = (unsigned char*) &uc;
unsigned char* p = reinterpret_cast<unsigned char*>(&uc);
*p++ = *bytes++;
*p++ = *bytes++;
*p++ = *bytes++;
*p++ = *bytes++;
if (_flipBytes)
ByteOrder::flipBytes(uc);
return uc;
ret = safeToInt(uc);
}

return ret;
Expand Down
2 changes: 1 addition & 1 deletion contrib/python/importlib-metadata/py3/.dist-info/METADATA
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: importlib-metadata
Version: 6.9.0
Version: 7.0.0
Summary: Read metadata from Python packages
Home-page: https://github.com/python/importlib_metadata
Author: Jason R. Coombs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import abc
import csv
import sys
import json
import email
import types
import inspect
import pathlib
import operator
Expand All @@ -20,7 +22,6 @@
NullFinder,
StrPath,
install,
pypy_partial,
)
from ._functools import method_cache, pass_none
from ._itertools import always_iterable, unique_everseen
Expand Down Expand Up @@ -131,34 +132,7 @@ def valid(line: str):
return line and not line.startswith('#')


class DeprecatedTuple:
"""
Provide subscript item access for backward compatibility.
>>> recwarn = getfixture('recwarn')
>>> ep = EntryPoint(name='name', value='value', group='group')
>>> ep[:]
('name', 'value', 'group')
>>> ep[0]
'name'
>>> len(recwarn)
1
"""

# Do not remove prior to 2023-05-01 or Python 3.13
_warn = functools.partial(
warnings.warn,
"EntryPoint tuple interface is deprecated. Access members by name.",
DeprecationWarning,
stacklevel=pypy_partial(2),
)

def __getitem__(self, item):
self._warn()
return self._key()[item]


class EntryPoint(DeprecatedTuple):
class EntryPoint:
"""An entry point as defined by Python packaging conventions.
See `the packaging docs on entry points
Expand Down Expand Up @@ -630,6 +604,16 @@ def url_req_space(req):
space = url_req_space(section.value)
yield section.value + space + quoted_marker(section.name)

@property
def origin(self):
return self._load_json('direct_url.json')

def _load_json(self, filename):
return pass_none(json.loads)(
self.read_text(filename),
object_hook=lambda data: types.SimpleNamespace(**data),
)


class DistributionFinder(MetaPathFinder):
"""
Expand Down
Loading

0 comments on commit b64e857

Please sign in to comment.