Skip to content

Conversation

@tombogle
Copy link
Contributor

@tombogle tombogle commented Feb 2, 2026

Also updated copyright year to 2026 and replaced use of deprecated CodeBase with Location (in tests).


This change is Reviewable

Replaced use of deprecated CodeBase with Location (in tests)
@tombogle tombogle self-assigned this Feb 2, 2026
Copy link
Contributor

@andrew-polk andrew-polk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrew-polk reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @aror92 and @mark-sil).


src/L10NSharp.Windows.Forms.Tests/ILocalizableComponentTests.cs line 29 at r1 (raw file):

		protected void TestSetup(string installedTranslationDir)
		{
			var dir = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().Location).LocalPath);

Looks fine and feel free to merge if you want, but devin review caught this:


CodeBase to Location migration is correct but creates codebase inconsistency

The change from Assembly.GetExecutingAssembly().CodeBase to Assembly.GetExecutingAssembly().Location at ILocalizableComponentTests.cs:29 is a valid modernization since CodeBase is obsolete in .NET 5+. The pattern new Uri(Location).LocalPath works because the Uri constructor recognizes absolute Windows file paths (like C:\path\to\assembly.dll) and converts them to file:// URIs internally.

However, this creates an inconsistency in the codebase - other test files still use the old CodeBase pattern:

  • XLiffUtilsTests.cs:16 uses Assembly.GetExecutingAssembly().CodeBase.Replace("file://", String.Empty)
  • LocalizationManagerXliffTests.cs:41 uses new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath
  • XLiffSchemaValidationTests.cs:21 uses new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath

These should likely be updated for consistency and to avoid obsolete API warnings when targeting .NET 5+.

Copy link
Contributor

@andrew-polk andrew-polk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrew-polk reviewed 4 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @aror92 and @mark-sil).

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Test Results

    6 files  ±0    84 suites  ±0   28s ⏱️ +8s
165 tests ±0  160 ✔️ +1    5 💤 ±0  0  - 1 
495 runs  ±0  480 ✔️ +1  15 💤 ±0  0  - 1 

Results for commit 3b42806. ± Comparison against base commit 3eeffa1.

@tombogle tombogle merged commit a404a2e into master Feb 3, 2026
8 of 14 checks passed
@tombogle tombogle deleted the release-v9-prep branch February 3, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants