Skip to content
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

Using a git submodule for Diplomat #4180

Closed
wants to merge 1 commit into from
Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/artifacts-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# GCP Boilerplate for jobs in main or forked repository (needs credentials)
- id: gcp-auth
Expand Down Expand Up @@ -99,6 +101,8 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# GCP Boilerplate for jobs in main or forked repository (needs credentials)
- id: gcp-auth
Expand Down Expand Up @@ -152,6 +156,8 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# GCP Boilerplate for jobs in main repository
- id: gcp-auth
Expand Down Expand Up @@ -229,6 +235,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# GCP Boilerplate for jobs in main repository
- id: gcp-auth
Expand Down Expand Up @@ -325,6 +333,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# GCP Boilerplate for jobs in main repository
- id: gcp-auth
Expand Down Expand Up @@ -402,6 +412,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# GCP Boilerplate for jobs in main repository
- id: gcp-auth
Expand Down Expand Up @@ -520,6 +532,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# GCP Boilerplate for jobs in main repository
- id: gcp-auth
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
CARGO_HTTP_MULTIPLEXING: false
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -101,6 +103,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -140,6 +144,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -179,6 +185,8 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -225,6 +233,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -267,6 +277,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -326,6 +338,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -373,6 +387,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Software setup/installation for the container
- name: Install Rust toolchains
Expand Down Expand Up @@ -435,6 +451,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Software setup/installation for the container
- name: Install Rust toolchains
Expand Down Expand Up @@ -490,6 +508,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -525,6 +545,8 @@ jobs:
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -561,6 +583,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -628,6 +652,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -667,6 +693,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -726,6 +754,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down Expand Up @@ -765,6 +795,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

# Cargo-make boilerplate
- name: Get cargo-make version
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

## Coverage steps

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
persist-credentials: false
submodules: 'recursive'

- name: "Run analysis"
uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # v2.1.3
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "utils/diplomat"]
path = utils/diplomat
url = git@github.com:rust-diplomat/diplomat.git
4 changes: 0 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ exclude = [
# Tutorials are tested in their own cargo workspace against released and
# local crates
"docs",
# Submodule with its own workspace and lock file
"utils/diplomat",
]

[workspace.package]
Expand Down Expand Up @@ -222,6 +224,12 @@ bies = { version = "0.2.2", path = "experimental/bies", default-features = false
ixdtf = { version = "0.1.1", path = "experimental/ixdtf", default-features = false }
zerotrie = { version = "0.1.1", path = "experimental/zerotrie", default-features = false }

# Diplomat submodule
diplomat = { version = "0.6", path = "utils/diplomat/macro" }
diplomat-runtime = { version = "0.6", path = "utils/diplomat/runtime" }
diplomat_core = { version = "0.6", path = "utils/diplomat/core" }
diplomat-tool = { version = "0.6", path = "utils/diplomat/tool" }

# Tools
icu_benchmark_macros = { path = "tools/benchmark/macros" }
# icu_benchmark_binsize never used as a dep
Expand All @@ -230,13 +238,6 @@ icu_benchmark_macros = { path = "tools/benchmark/macros" }
# ffi_coverage never used as a dep
# testdata-scripts never used as a dep

# The version here can either be a `version = ".."` spec or `git = "https://github.com/rust-diplomat/diplomat", rev = ".."`
# Diplomat must be published preceding a new ICU4X release but may use git versions in between
diplomat = { git = "https://github.com/rust-diplomat/diplomat", rev = "354307d4a519a3f42a9dc744ea0d64d766431d1d" }
diplomat-runtime = { git = "https://github.com/rust-diplomat/diplomat", rev = "354307d4a519a3f42a9dc744ea0d64d766431d1d" }
diplomat_core = { git = "https://github.com/rust-diplomat/diplomat", rev = "354307d4a519a3f42a9dc744ea0d64d766431d1d" }
diplomat-tool = { git = "https://github.com/rust-diplomat/diplomat", rev = "354307d4a519a3f42a9dc744ea0d64d766431d1d" }

# LTO is needed for WASM and other size-optimized builds,
# and it improve the performance of benchmarks
[profile.release]
Expand Down
5 changes: 0 additions & 5 deletions ffi/gn/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,5 @@
[source.crates-io]
replace-with = "vendored-sources"

[source."git+https://github.com/rust-diplomat/diplomat?rev=354307d4a519a3f42a9dc744ea0d64d766431d1d"]
git = "https://github.com/rust-diplomat/diplomat"
rev = "354307d4a519a3f42a9dc744ea0d64d766431d1d"
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "vendor"
3 changes: 0 additions & 3 deletions ffi/gn/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions ffi/gn/icu4x/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ rust_library("core_maths-v0_1_0") {

rust_proc_macro("diplomat-v0_6_0") {
crate_name = "diplomat"
crate_root = "//ffi/gn/vendor/diplomat/src/lib.rs"
crate_root = "//utils/diplomat/macro/src/lib.rs"
output_name = "diplomat-8a1fcb791ba6a84e"

deps = []
Expand All @@ -82,7 +82,7 @@ rust_proc_macro("diplomat-v0_6_0") {

rust_library("diplomat-runtime-v0_6_0") {
crate_name = "diplomat_runtime"
crate_root = "//ffi/gn/vendor/diplomat-runtime/src/lib.rs"
crate_root = "//utils/diplomat/runtime/src/lib.rs"
output_name = "diplomat_runtime-3f6b31a382e742d6"

deps = []
Expand All @@ -101,7 +101,7 @@ rust_library("diplomat-runtime-v0_6_0") {

rust_library("diplomat_core-v0_6_0") {
crate_name = "diplomat_core"
crate_root = "//ffi/gn/vendor/diplomat_core/src/lib.rs"
crate_root = "//utils/diplomat/core/src/lib.rs"
output_name = "diplomat_core-db39fa56ce5180b2"

deps = []
Expand Down
8 changes: 4 additions & 4 deletions tools/make/tidy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exit_on_error true
glob_pattern_array = array "./**/*.rs" "./**/*.yml" "./**/*.toml" "./**/*.rst" "./**/*.bat" "./**/*.c" "./**/*.cpp"

# Skip the files matching these patterns.
glob_skip_pattern_array = array "**/target/**/*" "ffi/capi/*/docs/**/*" "**/node_modules/**/*" "**/data/**/*" "ffi/gn/vendor/**/*" "ffi/gn/third_party_tools/**/*" "ffi/capi/c/examples/fixeddecimal_tiny/baked_data/**/*"
glob_skip_pattern_array = array "**/target/**/*" "ffi/capi/*/docs/**/*" "**/node_modules/**/*" "**/data/**/*" "ffi/gn/vendor/**/*" "ffi/gn/third_party_tools/**/*" "ffi/capi/c/examples/fixeddecimal_tiny/baked_data/**/*" "utils/diplomat/**/*"

blank_line = set ""

Expand Down Expand Up @@ -136,7 +136,7 @@ script = '''
exit_on_error true

glob_pattern = set "./**/Cargo.toml"
glob_skip_pattern = array "ffi/gn/**/*" "ffi/capi/*/examples/**/*" "tools/**/*" "**/fuzz/*" "**/target/**/*" "docs/**/*"
glob_skip_pattern = array "ffi/gn/**/*" "ffi/capi/*/examples/**/*" "tools/**/*" "**/fuzz/*" "**/target/**/*" "docs/**/*" "utils/diplomat/**/*"

cargo_list = exec cargo --list
if not contains ${cargo_list.stdout} "rdme"
Expand Down Expand Up @@ -206,7 +206,7 @@ exit_on_error true

glob_pattern = set "./**/Cargo.toml"
license = canonicalize LICENSE
skip_path_prefixes = array "ffi/gn/vendor/" "ffi/gn/third_party_tools/" "ffi/capi/c/examples" "docs/" "utils/calendrical_calculations"
skip_path_prefixes = array "ffi/gn/vendor/" "ffi/gn/third_party_tools/" "ffi/capi/c/examples" "docs/" "utils/calendrical_calculations" "utils/diplomat"

handle = glob_array ${glob_pattern}
for path in ${handle}
Expand Down Expand Up @@ -234,7 +234,7 @@ exit_on_error true
glob_pattern = set "./**/Cargo.toml"
license = canonicalize LICENSE
license_text = readfile ${license}
skip_path_prefixes = array "ffi/gn/vendor/" "ffi/gn/third_party_tools/" "ffi/capi/c/examples" "docs/" "utils/calendrical_calculations"
skip_path_prefixes = array "ffi/gn/vendor/" "ffi/gn/third_party_tools/" "ffi/capi/c/examples" "docs/" "utils/calendrical_calculations" "utils/diplomat"

handle = glob_array ${glob_pattern}
for path in ${handle}
Expand Down
1 change: 1 addition & 0 deletions utils/diplomat
Submodule diplomat added at 354307
Loading