diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 4f17952..6cdbae8 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -19,6 +19,7 @@ jobs: matrix: config: - {os: windows-latest, r: 'release', rust-version: 'stable-msvc'} + - {os: windows-latest, r: 'devel', rust-version: 'stable-msvc'} - {os: macOS-latest, r: 'release', rust-version: 'stable'} - {os: ubuntu-latest, r: 'release', rust-version: '1.69.0'} - {os: ubuntu-latest, r: 'devel', rust-version: 'stable'} diff --git a/DESCRIPTION b/DESCRIPTION index 062821b..76cb2bd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: tok Title: Fast Text Tokenization -Version: 0.1.4.9000 +Version: 0.1.5 Authors@R: c( person("Daniel", "Falbel", , "daniel@posit.co", c("aut", "cre")), person("Regouby", "Christophe", , "christophe.regouby@free.fr", c("ctb")), diff --git a/NEWS.md b/NEWS.md index 7488676..aa5cf3b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# tok (development version) +# tok 0.1.5 - add message translation in FR (#19, @cregouby) diff --git a/src/Makevars b/src/Makevars index 666fcf7..88ca9c9 100644 --- a/src/Makevars +++ b/src/Makevars @@ -13,8 +13,6 @@ $(STATLIB): # to set it here to ensure cargo can be invoked. It is appended to PATH and # therefore is only used if cargo is absent from the user's PATH. - - if [ "$(VENDORING)" = "yes" ]; then \ $(TAR) --extract --xz -f ./rust/vendor.tar.xz -C ./rust && \ mkdir -p ./rust/.cargo; \ @@ -25,7 +23,7 @@ $(STATLIB): export CARGO_HOME=$(CARGOTMP); \ fi && \ echo "*** Rust version: $$(rustc --version)" && \ - cargo build --lib --release --offline --config rust/config/cargo-config.toml --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR) --jobs 1 + cargo build --lib --release --offline --config rust/config/cargo-config.toml --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR) # we clean headers to avoid a message like # Found the following sources/headers with CR or CRLF line endings: diff --git a/src/Makevars.win b/src/Makevars.win index 389344b..eea85cd 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,4 +1,5 @@ TARGET = $(subst 64,x86_64,$(subst 32,i686,$(WIN)))-pc-windows-gnu +VENDORING = yes TARGET_DIR = ./rust/target LIBDIR = $(TARGET_DIR)/$(TARGET)/release @@ -19,6 +20,10 @@ $(STATLIB): # For more details, please refer to # https://github.com/r-windows/rtools-packages/blob/2407b23f1e0925bbb20a4162c963600105236318/mingw-w64-gcc/PKGBUILD#L313-L316 touch $(TARGET_DIR)/libgcc_mock/libgcc_eh.a + + if [ "$(VENDORING)" = "yes" ]; then \ + $(TAR) --extract --xz -f ./rust/vendor.tar.xz -C ./rust; \ + fi # CARGO_LINKER is provided in Makevars.ucrt for R >= 4.2 export CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER="$(CARGO_LINKER)" && \ @@ -26,7 +31,14 @@ $(STATLIB): if [ "$(NOT_CRAN)" != "true" ]; then \ export CARGO_HOME=$(CARGOTMP); \ fi && \ - cargo build --target=$(TARGET) --lib --release --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR) + echo "*** Rust version: $$(rustc --version)" && \ + cargo build --target=$(TARGET) --lib --release --offline --config rust/config/cargo-config.toml --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR) + + # we clean headers to avoid a message like + # Found the following sources/headers with CR or CRLF line endings: + # src/rust/vendor/clang-sys/tests/header.h + @echo "*** Cleaning headers" + "${R_HOME}/bin${R_ARCH_BIN}/Rscript" "../tools/patch.R" if [ "$(NOT_CRAN)" != "true" ]; then \ rm -Rf $(CARGOTMP) && \