Update to 0.0.34 (close RHBZ#2463427)
This commit is contained in:
parent
5f2754c029
commit
7acaf0b97b
3 changed files with 10 additions and 116 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -33,3 +33,5 @@
|
|||
/ruff-ee9088eebf068f4b3a14f5ee34607f72d3513186.tar.gz
|
||||
/ty-0.0.32.tar.gz
|
||||
/ruff-3e9ed60c72ae05871879ac56e7dd4666cfda93a3.tar.gz
|
||||
/ty-0.0.34.tar.gz
|
||||
/ruff-e990dfd069fceef96f797b46161ef78862608449.tar.gz
|
||||
|
|
|
|||
5
sources
5
sources
|
|
@ -1,4 +1,3 @@
|
|||
SHA512 (ty-0.0.32.tar.gz) = 3f839ef9f504171793f566a335d733713b1c7c575e4e60eadeb6bf06ea6efc35aebb9a15ee6587f261de7e1b06a95c6a28c295a6e95b4def16d1ca93803cfedc
|
||||
SHA512 (ruff-3e9ed60c72ae05871879ac56e7dd4666cfda93a3.tar.gz) = ea4420ce55af7b5efff2b91c29e61d0e195808f8d74653c27c64a28f3ce8060f3fe6a0faad841afe65cb3909f144f9292cc67c04ed1b5d10106c5e2164176778
|
||||
SHA512 (ty-0.0.34.tar.gz) = 915b11846091be4131629cdb5d23b57fd26b285d2d8e185b303166a3f663514b96f7f745d697ccaced2a9972e470ccbdc748f9790aa92a46f91b88bb60a58864
|
||||
SHA512 (ruff-e990dfd069fceef96f797b46161ef78862608449.tar.gz) = e455721e573d5276a75d145519fc4f3e7740e8c23751875acd45de1cd0e90018ed68eec1c50997f64f9960d838a6597056bfcf9b1ce3e0ea593d45552dd7bd40
|
||||
SHA512 (lsp-types-e15db0593f0ecbbd80599c3f5880e4bf5da1ca0c.tar.gz) = 097e4371ebde03c5f80e4f2c0eaf8354ce53c0472170536df5a155b33d19a4c20a498aa67684c7a764af31115cae02ec42c463044972d4dece7449ea241d6970
|
||||
SHA512 (salsa-2f687a17ceea8ec7aaa605561ccbde938ccef086.tar.gz) = 8299b53c94ffa67dcd8fb903247469375c04efa6e581d4696576b02f5b325ca84f14b12c0b9f93a4792900983356613de489dbdab886b0396b74967b26bd114d
|
||||
|
|
|
|||
119
ty.spec
119
ty.spec
|
|
@ -8,7 +8,7 @@
|
|||
%bcond check 1
|
||||
|
||||
Name: ty
|
||||
Version: 0.0.32
|
||||
Version: 0.0.34
|
||||
# The ty package has a permanent exception to the Updates Policy in Fedora,
|
||||
# so it can be updated in stable releases across SemVer boundaries (subject to
|
||||
# good judgement and actual compatibility of any reverse dependencies). See
|
||||
|
|
@ -74,12 +74,8 @@ Summary: Extremely fast Python type checker and language server
|
|||
#
|
||||
# Apache-2.0 OR MIT:
|
||||
# - crates/ruff_annotate_snippets/ is a fork of the annotate-snippets crate
|
||||
# - salsa, salsa-macros, salsa-macros-rules, Source300
|
||||
#
|
||||
# MIT:
|
||||
# - book/mermaid.min.js in the vendored salsa snapshot; does not contribute
|
||||
# to the licenses of the binary RPMs, since we do not package the book, and
|
||||
# it is removed in %%prep to be sure
|
||||
# - lsp-types, Source200
|
||||
#
|
||||
# =====
|
||||
|
|
@ -166,9 +162,9 @@ Source: %{url}/archive/%{version}/ty-%{version}.tar.gz
|
|||
|
||||
# Regarding bundling ruff, see the comments at the beginning of the spec file.
|
||||
%global ruff_git https://github.com/astral-sh/ruff
|
||||
%global ruff_rev 3e9ed60c72ae05871879ac56e7dd4666cfda93a3
|
||||
%global ruff_baseversion 0.15.11
|
||||
%global ruff_snapdate 20260420
|
||||
%global ruff_rev e990dfd069fceef96f797b46161ef78862608449
|
||||
%global ruff_baseversion 0.15.12
|
||||
%global ruff_snapdate 20260501
|
||||
Source100: %{ruff_git}/archive/%{ruff_rev}/ruff-%{ruff_rev}.tar.gz
|
||||
|
||||
# Currently, ruff must use a fork of lsp-types,
|
||||
|
|
@ -182,25 +178,12 @@ Source100: %{ruff_git}/archive/%{ruff_rev}/ruff-%{ruff_rev}.tar.gz
|
|||
%global lsp_types_snapdate 20260220
|
||||
Source200: %{lsp_types_git}/archive/%{lsp_types_rev}/lsp-types-%{lsp_types_rev}.tar.gz
|
||||
|
||||
# For now, ruff still needs to use a git snapshot of salsa because it
|
||||
# frequently needs bug fixes faster than the salsa release cycle delivers them;
|
||||
# see https://github.com/astral-sh/ruff/pull/17566#issuecomment-2823146473.
|
||||
#
|
||||
# Check https://github.com/salsa-rs/salsa/blob/%%{salsa_rev}/Cargo.toml to
|
||||
# observe the version and https://github.com/salsa-rs/commit/%%{salsa_rev} to
|
||||
# observe the date.
|
||||
%global salsa_git https://github.com/salsa-rs/salsa
|
||||
%global salsa_rev 2f687a17ceea8ec7aaa605561ccbde938ccef086
|
||||
%global salsa_baseversion 0.26.1
|
||||
%global salsa_snapdate 20260320
|
||||
Source300: %{salsa_git}/archive/%{salsa_rev}/salsa-%{salsa_rev}.tar.gz
|
||||
|
||||
# Get this from ruff/crates/ty_vendored/vendor/typeshed/source_commit.txt.
|
||||
%global typeshed_rev c03c2b926422c82ab680d27f3ad2491845000802
|
||||
%global typeshed_rev e4d32e01bee44241a5e7c33298c261175b9f1bdb
|
||||
# The typeshed project as a whole has never been versioned.
|
||||
%global typeshed_baseversion 0
|
||||
# Inspect https://github.com/python/typeshed/commit/%%{typeshed_rev}.
|
||||
%global typeshed_snapdate 20260414
|
||||
%global typeshed_snapdate 20260428
|
||||
|
||||
# Downstream patch: always find the system-wide ty executable
|
||||
#
|
||||
|
|
@ -237,13 +220,6 @@ Provides: bundled(ruff) = %{ruff_version}
|
|||
%global lsp_types_version %{lsp_types_baseversion}^%{lsp_types_snapinfo}
|
||||
Provides: bundled(crate(lsp-types)) = %{lsp_types_version}
|
||||
|
||||
# This is a snapshot of salsa; see the notes about Source300.
|
||||
%global salsa_snapinfo %{salsa_snapdate}git%{sub %{salsa_rev} 1 7}
|
||||
%global salsa_version %{salsa_baseversion}^%{salsa_snapinfo}
|
||||
Provides: bundled(crate(salsa)) = %{salsa_version}
|
||||
Provides: bundled(crate(salsa-macros)) = %{salsa_version}
|
||||
Provides: bundled(crate(salsa-macro-rules)) = %{salsa_version}
|
||||
|
||||
# This is not versioned or released as a whole, and it is normal for
|
||||
# type-checkers to vendor it. See
|
||||
# https://typing.python.org/en/latest/spec/distributing.html#the-typeshed-project.
|
||||
|
|
@ -336,57 +312,6 @@ popd
|
|||
popd
|
||||
install -t LICENSE.bundled/lsp-types -D -p -m 0644 ruff/crates/lsp-types/LICENSE
|
||||
|
||||
# See comments above Source300:
|
||||
%setup -q -T -D -b 300 -n ty-%{version}
|
||||
mv ../salsa-%{salsa_rev} ruff/crates/salsa
|
||||
mv ruff/crates/salsa/components/salsa-macro-rules ruff/crates/salsa-macro-rules
|
||||
mv ruff/crates/salsa/components/salsa-macros ruff/crates/salsa-macros
|
||||
pushd ruff
|
||||
git2path workspace.dependencies.salsa crates/salsa
|
||||
pushd crates/salsa
|
||||
%autopatch -p1 -m300 -M399
|
||||
popd
|
||||
# These were taken from salsa’s workspace, but we have added the salsa crates
|
||||
# to ruff’s workspace, and we cannot have more than one workspace.
|
||||
tomcli set crates/salsa/Cargo.toml del 'workspace.package.authors'
|
||||
tomcli set crates/salsa/Cargo.toml list package.authors 'Salsa developers'
|
||||
for field in edition license repository rust-version
|
||||
do
|
||||
value="$(tomcli get crates/salsa/Cargo.toml "workspace.package.${field}")"
|
||||
tomcli set crates/salsa/Cargo.toml del "workspace.package.${field}"
|
||||
tomcli set crates/salsa/Cargo.toml str "package.${field}" "${value}"
|
||||
done
|
||||
# Now remove salsa’s workspace entirely.
|
||||
tomcli set crates/salsa/Cargo.toml del workspace
|
||||
# Fix up paths to ancillary salsa crates since we have moved them into the
|
||||
# workspace.
|
||||
tomcli set crates/salsa/Cargo.toml str dependencies.salsa-macro-rules.path \
|
||||
'../salsa-macro-rules'
|
||||
tomcli set crates/salsa/Cargo.toml str dependencies.salsa-macros.path \
|
||||
'../salsa-macros'
|
||||
tomcli set crates/salsa/Cargo.toml str \
|
||||
"target.'cfg(any())'.dependencies.salsa-macros.path" \
|
||||
'../salsa-macros'
|
||||
# Remove examples, and omit dev-dependencies that are only for examples:
|
||||
rm -rv crates/salsa/examples/
|
||||
tomcli set crates/salsa/Cargo.toml del example
|
||||
for crate in crossbeam-channel eyre notify-debouncer-mini ordered-float
|
||||
do
|
||||
tomcli set crates/salsa/Cargo.toml del "dev-dependencies.${crate}"
|
||||
done
|
||||
# Remove benchmark-only dev-dependencies
|
||||
for crate in annotate-snippets codspeed-criterion-compat
|
||||
do
|
||||
tomcli set crates/salsa/Cargo.toml del "dev-dependencies.${crate}"
|
||||
done
|
||||
# Remove the shuttle feature since rust-shuttle is not packaged
|
||||
tomcli set crates/salsa/Cargo.toml del features.shuttle
|
||||
tomcli set crates/salsa/Cargo.toml del dependencies.shuttle
|
||||
# Remove bundled, pre-compiled mermaid JavaScript to prove it is not used.
|
||||
rm crates/salsa/book/mermaid.min.js
|
||||
popd
|
||||
install -t LICENSE.bundled/salsa -D -p -m 0644 ruff/crates/salsa/LICENSE-*
|
||||
|
||||
# Loosen some version bounds. We retain this comment and the following example
|
||||
# even when there are currently no dependencies that need to be adjusted.
|
||||
#
|
||||
|
|
@ -431,20 +356,6 @@ EOF
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Verify we have the correct base version for salsa
|
||||
salsa_version_in_source="$(tomcli get ruff/crates/salsa/Cargo.toml package.version)"
|
||||
if [[ '%{salsa_baseversion}' != "${salsa_version_in_source}" ]]
|
||||
then
|
||||
cat 1>&2 <<EOF
|
||||
Mismatch between %%{salsa_baseversion}:
|
||||
%{salsa_baseversion}
|
||||
and version in ruff/crates/salsa/Cargo.toml:
|
||||
${salsa_version_in_source}
|
||||
Please update %%{salsa_baseversion} in the spec file!
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
# For unclear reasons, maturin checks for all crate dependencies when it is
|
||||
|
|
@ -511,24 +422,6 @@ install -Dpm 0644 _ty -t %{buildroot}/%{zsh_completions_dir}
|
|||
# We may need this if rustc diagnostics change from what upstream expects.
|
||||
#export TRYBUILD=overwrite
|
||||
|
||||
# In the bundled salsa, this fails because the source paths are different than
|
||||
# expected, i.e. crates/salsa/tests/backtrace.rs instead of tests/backtrace.rs.
|
||||
# We skip the test because it is unnecessary and potentially brittle, but the
|
||||
# error message notes that exporting UPDATE_EXPECT=1 would also be a way to
|
||||
# ignore this kind of discrepancy.
|
||||
skip="${skip-} --skip backtrace_works"
|
||||
# These also fail due to similar path issues.
|
||||
# color/ann_{eof,insertion,multiline,multiline2,removed_nl}.toml
|
||||
# color/ensure-emoji-highlight-width.toml
|
||||
# color/fold_{ann_multiline,bad_origin_line,leading,trailing}.toml
|
||||
# color/issue_9.toml
|
||||
# color/multiple_annotations.toml
|
||||
# color/simple.toml
|
||||
# color/strip_line{,_char,_non_ws}.toml
|
||||
# We could export SNAPSHOTS=overwrite, but that would ignore many other
|
||||
# possible discrepancies. Skipping the affected tests is better.
|
||||
skip="${skip-} --skip color/"
|
||||
|
||||
# Fails cryptically: requires network, perhaps?
|
||||
# error: no matching package named `boxcar` found
|
||||
# location searched: crates.io index
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue