[🚀 Feature]: Provide a Single Source of truth for .NET dependency versions
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- csharp
- 領域
- build-system
調査の方向性
まず、dotnet/paket.dependencies、dotnet/src/*/.csproj ファイル、DevToolsGenerator.csproj、Selenium.WebDriver.nuspec にある既存の依存関係定義を読みます。Directory.Packages.props が他のソースをどのように生成または補完すべきかを決める前に、既存の paket2bazel および nuget_pack の仕組みを追跡します。依存関係のバージョンが単一の信頼できる情報源を持ち、生成された入力と IDE/build の入力が常に一致し、Renovate がユーザー向けおよび開発用として意図されたバージョンを更新できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Rather than doing this piecemeal by PR (see #17563), this issue serves to explain the root problem, with recommended solution and discussion of alternatives.
Description
Note that this plan is worth doing on its own, but this approach aligns with Simon's rules_dotnet proposal to replace Paket entirely with NuGet. If that is implemented we just delete the pieces from this plan that would no longer apply, we wouldn't need to re-architect anything.
Problem
.NET package versions live in four places in this repo, everything is hard coded to explicit versions and updates must be made by hand (not currently possible to automate updates with Bazel or Renovate).
| File | Role |
|---|---|
dotnet/paket.dependencies |
What Bazel uses for build/test |
dotnet/src/*/.csproj <PackageReference Version=...> |
IDE-only, ignored by bazel |
third_party/dotnet/devtools/src/generator/DevToolsGenerator.csproj <PackageReference Version=...> |
IDE-only, ignored by bazel |
dotnet/src/webdriver/Selenium.WebDriver.nuspec <dependency version=...> |
Floor versions required for users in nupkg |
So our build process ignores the csproj, and doesn't have any contract to validate that what is in nuspec or csproj is what we're actually testing or building.
Renovate doesn't work with Paket, only csproj files, but since bazel ignores them we can't use Renovate to update things.
These versions have already drifted between sources. Three packages have already diverged between paket.dependencies and the devtools generator csproj: CommandLineParser (2.8.0 vs 2.9.1), Humanizer.Core (2.8.26 vs 2.14.1), Microsoft.Extensions.DependencyInjection (3.1.9 vs 3.1.32).
Also because how .NET dependency version management works, we want to test with the oldest supported user-facing versions and the latest dev-only versions
What this proposal would do
dotnet/Directory.Packages.propsCreate this file in NuGet's Central Package Management format (mainstream since 2021 with Renovate support) as the single source of truth for .NET versions and derive other sources from it.- csproj files remove versions and have the IDE get required versions from CPM natively (no additional support required from Selenium)
- The published nupkg's
<dependencies>block is rendered from CPM at build time by the existing nuspec template substitution mechanism innuget_pack(which already substitutes$packageid$and$version$, so this is just an additional parsing with existing approach). paket.dependenciesgets automatically generated based on CPM values. This is the heaviest lift, but we'll keep the file version controlled for visibility.paket.lockandpaket.nuget.bzlwill pin transitive versions based on what is inpaket.dependencies.renovate.jsonwill differentiate user-facing versions to only update the floor version for security issues, and allow the dev-dependencies to update patch or minor versions.
Potential concerns
- There are CPM features that wouldn't be recognized by Bazel
- Nothing in csproj is currently recognized by Bazel so this is no different from status quo.
- We can add additional checks if this is considered a blocker.
- Added obfuscation from build process
- We can add comments to each relevant file pointing at the source-of-truth explaining usage and restrictions
- paket.dependencies stays version-controlled and human-readable (not buried in a generator's stdout).
- The primary conversion code is a small, single-purpose script that extends the existing paket2bazel chain rather than introducing a parallel mechanism.
- Need to make sure we have the right behavior for transitive dependencies, and we may need to add some to CPM to pin them if needed.
Alternatives
- Make
paket.dependenciesthe single source of truth (see #17577)- Requires adding additional custom reference files and imports to each csproj file versus using the CPM standard
- Would need to be completely reverted if we convert rules_dotnet to use Nuget instead of Paket
- Updates must still be done by hand
- Remains disconnected from nuspec
- Update the nuspec template dynamically the same way we update
paket.dependencies.- Pro: we keep visibility
- Con: it's a different approach from what we currently do
Does this apply to specific language bindings?
C#/.NET
What part(s) of Selenium does this relate to?
Build (CI or Bazel)
- 主要言語
- Java
- スター
- 34.6k
- フォーク
- 8.7k
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 107
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SeleniumHQ/selenium のほかの issue
-
C-py I-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
SeleniumHQ/selenium#18438 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
SeleniumHQ/selenium#18323 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
B-build C-py I-enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
SeleniumHQ/selenium#18435 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[🐛 Bug]: Bindings change the user's options when Selenium Manager supplies a browser対応中かも @Liz-Lian が 2 日前に担当しました。 オープンC-dotnet C-java C-nodejs C-py C-rb I-defect
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
SeleniumHQ/selenium#18428 ·
メンテナーはふだん 1 日以内に返信
-
[🐛 Bug]: [rust] Selenium Manager can return a browser from the cache before it finishes copying対応中かも @Liz-Lian が 2 日前に担当しました。 オープンC-rust I-defect
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
SeleniumHQ/selenium#18427 ·
メンテナーはふだん 1 日以内に返信
SeleniumHQ/selenium の issue をすべて見る
似ている issue
-
area-integrations
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
? - Needs Triage bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA/cudf-spark-jni#5598 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
oracle/graalvm-reachability-metadata#12264 ·
メンテナーはふだん 1 日以内に返信
-
[source-facebook-pages] post stream never returns attachments.media_type対応中かも @v-k-data が今日担当しました。 オープンarea/connectors needs-triage type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
[BUG] AppSync: GetIntrospectionSchema wraps the schema in JSON instead of returning the raw SDL bodyオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
floci-io/floci#10107 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信