Skip to content

Commit

Permalink
Merge pull request nushell#2 from WindSoilder/raw_string_support
Browse files Browse the repository at this point in the history
Merge from main
  • Loading branch information
fdncred authored Apr 25, 2024
2 parents 4d57d47 + b084b89 commit 0d5d0c3
Show file tree
Hide file tree
Showing 1,082 changed files with 44,515 additions and 14,932 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: true
steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.3
- uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/check-msrv.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
let toolchain_spec = open rust-toolchain.toml | get toolchain.channel
let msrv_spec = open Cargo.toml | get package.rust-version

# This check is conservative in the sense that we use `rust-toolchain.toml`'s
# override to ensure that this is the upper-bound for the minimum supported
# rust version
if $toolchain_spec != $msrv_spec {
print -e "Mismatching rust compiler versions specified in `Cargo.toml` and `rust-toolchain.toml`"
print -e $"Cargo.toml: ($msrv_spec)"
print -e $"rust-toolchain.toml: ($toolchain_spec)"
exit 1
}
33 changes: 24 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ env:
NUSHELL_CARGO_PROFILE: ci
NU_LOG_LEVEL: DEBUG
# If changing these settings also change toolkit.nu
CLIPPY_OPTIONS: "-D warnings -D clippy::unwrap_used"
CLIPPY_OPTIONS: "-D warnings -D clippy::unwrap_used -D clippy::unchecked_duration_subtraction"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true

jobs:
fmt-clippy:
Expand All @@ -20,7 +24,11 @@ jobs:
# Pinning to Ubuntu 20.04 because building on newer Ubuntu versions causes linux-gnu
# builds to link against a too-new-for-many-Linux-installs glibc version. Consider
# revisiting this when 20.04 is closer to EOL (April 2025)
platform: [windows-latest, macos-latest, ubuntu-20.04]
#
# Using macOS 13 runner because 14 is based on the M1 and has half as much RAM (7 GB,
# instead of 14 GB) which is too little for us right now. Revisit when `dfr` commands are
# removed and we're only building the `polars` plugin instead
platform: [windows-latest, macos-13, ubuntu-20.04]
feature: [default, dataframe]
include:
- feature: default
Expand All @@ -30,13 +38,13 @@ jobs:
exclude:
- platform: windows-latest
feature: dataframe
- platform: macos-latest
- platform: macos-13
feature: dataframe

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.3

- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
Expand Down Expand Up @@ -81,7 +89,7 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.3

- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
Expand Down Expand Up @@ -113,7 +121,7 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.3

- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
Expand All @@ -126,6 +134,9 @@ jobs:
- name: Standard library tests
run: nu -c 'use crates/nu-std/testing.nu; testing run-tests --path crates/nu-std'

- name: Ensure that Cargo.toml MSRV and rust-toolchain.toml use the same version
run: nu .github/workflows/check-msrv.nu

- name: Setup Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -154,20 +165,24 @@ jobs:
strategy:
fail-fast: true
matrix:
platform: [windows-latest, macos-latest, ubuntu-20.04]
# Using macOS 13 runner because 14 is based on the M1 and has half as much RAM (7 GB,
# instead of 14 GB) which is too little for us right now.
#
# Failure occuring with clippy for rust 1.77.2
platform: [windows-latest, macos-13, ubuntu-20.04]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.3

- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
with:
rustflags: ""

- name: Clippy
run: cargo clippy --package nu_plugin_* ${{ matrix.flags }} -- $CLIPPY_OPTIONS
run: cargo clippy --package nu_plugin_* -- $CLIPPY_OPTIONS

- name: Tests
run: cargo test --profile ci --package nu_plugin_*
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# if: github.repository == 'nushell/nightly'
steps:
- name: Checkout
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.3
if: github.repository == 'nushell/nightly'
with:
ref: main
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.3
with:
ref: main
fetch-depth: 0
Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.3
with:
ref: main
fetch-depth: 0
Expand Down Expand Up @@ -310,7 +310,7 @@ jobs:
- name: Waiting for Release
run: sleep 1800

- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.3
with:
ref: main

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
name: Std

strategy:
fail-fast: false
matrix:
target:
- aarch64-apple-darwin
Expand Down Expand Up @@ -72,16 +73,17 @@ jobs:
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.3

- name: Update Rust Toolchain Target
run: |
echo "targets = ['${{matrix.target}}']" >> rust-toolchain.toml
- name: Setup Rust toolchain and cache
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
# WARN: Keep the rustflags to prevent from the winget submission error: `CAQuietExec: Error 0xc0000135`
with:
cache: false
rustflags: ''

- name: Setup Nushell
Expand Down Expand Up @@ -161,16 +163,17 @@ jobs:
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v4.1.2
- uses: actions/checkout@v4.1.3

- name: Update Rust Toolchain Target
run: |
echo "targets = ['${{matrix.target}}']" >> rust-toolchain.toml
- name: Setup Rust toolchain and cache
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
# WARN: Keep the rustflags to prevent from the winget submission error: `CAQuietExec: Error 0xc0000135`
with:
cache: false
rustflags: ''

- name: Setup Nushell
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.1.3

- name: Check spelling
uses: crate-ci/typos@v1.19.0
uses: crate-ci/typos@v1.20.10
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Welcome to Nushell and thank you for considering contributing!

More resources can be found in the nascent [developer documentation](devdocs/README.md) in this repo.

- [Developer FAQ](FAQ.md)
- [Platform support policy](PLATFORM_SUPPORT.md)
- [Developer FAQ](devdocs/FAQ.md)
- [Platform support policy](devdocs/PLATFORM_SUPPORT.md)
- [Our Rust style](devdocs/rust_style.md)

## Proposing design changes
Expand Down
Loading

0 comments on commit 0d5d0c3

Please sign in to comment.