Skip to content

Recognizes version variables and updates the version accordingly#478

Open
IT-VBFK wants to merge 1 commit into
Fallout-build:mainfrom
IT-VBFK:fix/csproj-convert-version-var
Open

Recognizes version variables and updates the version accordingly#478
IT-VBFK wants to merge 1 commit into
Fallout-build:mainfrom
IT-VBFK:fix/csproj-convert-version-var

Conversation

@IT-VBFK

@IT-VBFK IT-VBFK commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Closes #477

@IT-VBFK
IT-VBFK requested a review from a team as a code owner July 11, 2026 18:53
@ITaluone
ITaluone force-pushed the fix/csproj-convert-version-var branch from 2e73450 to 1391641 Compare July 11, 2026 18:53
@ITaluone
ITaluone requested a review from ChrisonSimtian July 11, 2026 18:54
@ITaluone ITaluone added enhancement New feature or request target/vCurrent Targets the current version labels Jul 11, 2026
@IT-VBFK
IT-VBFK force-pushed the fix/csproj-convert-version-var branch from f157a46 to 40c5ed9 Compare July 12, 2026 05:32
@ChrisonSimtian
ChrisonSimtian requested a review from Copilot July 12, 2026 08:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates Fallout.Migrate’s .csproj rewrite logic to handle projects that pin Fallout/Nuke package versions via MSBuild properties (e.g., Version="$(NukeVersion)"), aligning with issue #477’s migration expectations.

Changes:

  • Refines the “inline literal version” rewrite to avoid consuming Version="$(...)" so variable-based versions can be handled separately.
  • Adds a new pass that discovers version variables used by PackageReferences and bumps the corresponding property values to the target Fallout version.
  • Extends specs to cover NukeVersionFalloutVersion renaming and arbitrary version-variable bumping behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/Fallout.Migrate/CsprojRewriter.cs Adds variable-aware version handling and bumps property-based versions to the target Fallout version.
tests/Fallout.Migrate.Specs/CsprojRewriterSpecs.cs Adds/adjusts specs to validate migration behavior for version variables.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Fallout.Migrate/CsprojRewriter.cs
Comment thread src/Fallout.Migrate/CsprojRewriter.cs
Comment thread tests/Fallout.Migrate.Specs/CsprojRewriterSpecs.cs
@IT-VBFK
IT-VBFK requested a review from ChrisonSimtian July 12, 2026 11:51
@IT-VBFK
IT-VBFK force-pushed the fix/csproj-convert-version-var branch from da9ece9 to d3fc9b9 Compare July 12, 2026 11:56
@ITaluone
ITaluone force-pushed the fix/csproj-convert-version-var branch from d3fc9b9 to f3ff5e1 Compare July 12, 2026 11:57
@ITaluone

Copy link
Copy Markdown
Collaborator

@copilot review

@ITaluone
ITaluone force-pushed the fix/csproj-convert-version-var branch from f3ff5e1 to 2fb66d4 Compare July 12, 2026 13:41
@IT-VBFK IT-VBFK changed the title Recogizes version variables and updates the version accordingly Recognizes version variables and updates the version accordingly Jul 12, 2026
@IT-VBFK
IT-VBFK force-pushed the fix/csproj-convert-version-var branch from 2fb66d4 to 51c3c6b Compare July 12, 2026 18:05
@ITaluone
ITaluone force-pushed the fix/csproj-convert-version-var branch 2 times, most recently from 0550dd3 to 8e438a1 Compare July 14, 2026 06:16
Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated
@ITaluone

ITaluone commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Do not merge, please (meaning now).

I rebase the commits later to better commits :)

@ITaluone
ITaluone requested a review from avidenic July 15, 2026 13:47
Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated
Comment thread tests/Fallout.Migrate.Specs/CsprojRewriterSpecs.cs
@IT-VBFK
IT-VBFK force-pushed the fix/csproj-convert-version-var branch from fb768bd to 32902ef Compare July 15, 2026 15:28
@ITaluone

Copy link
Copy Markdown
Collaborator

@avidenic Can you do the final review.. mine isn't worth it (person from IT-VBFK == ITaluone) ;)

@dennisdoomen

Copy link
Copy Markdown
Collaborator

As I'm cleaning up the migration, please wait with the merge after which I've taken a look.

@avidenic avidenic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good improvements, some small issues to look at. Some should probably go into follow up issues / PRs. Or we can decide we're fine and just add docs about gaps.

Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated
Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated
Comment thread src/Fallout.Migrate/CsprojRewriter.cs
@ITaluone ITaluone added the AI code Contains AI code label Jul 16, 2026
@ITaluone
ITaluone force-pushed the fix/csproj-convert-version-var branch from 80cc687 to a3240c0 Compare July 16, 2026 14:51

@avidenic avidenic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Substantial improvements. There are still some decisions to be made though.

Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated
Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated
Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated
Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated
Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated
Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated
Comment thread tests/Fallout.Migrate.Specs/CsprojRewriterSpecs.cs Outdated
Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated

@dennisdoomen dennisdoomen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd like to up our game here, even for our migration code, as that is going to be existing for years to come. So I'm going to be a bit more critical on the code review level. Don't get me wrong. We love all these contributions, but Nuke's code hasn't been particularly well factored and documented. So bear with me.

🔧 The PRs should explain what they are trying to do. Just a reference to an old (potentially convoluted) Nuke issue isn't enough anymore.
📝 The new code in this PR is IMO too long, too cryptic and has too little documentation.

Comment thread src/Fallout.Migrate/CsprojRewriter.cs Outdated
Comment thread tests/Fallout.Migrate.Specs/CsprojRewriterSpecs.cs Outdated
Comment thread docs/migration/from-nuke.md Outdated
@IT-VBFK

IT-VBFK commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Ok.. I propose to start over with small focused steps

Ok @dennisdoomen?

@dennisdoomen

Copy link
Copy Markdown
Collaborator

Ok.. I propose to start over with small focused steps

Yeah, and base it on #507

@IT-VBFK

IT-VBFK commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Cool
Will do so

I couldn't imagine how far your migration refactoring could go 😂😂

@IT-VBFK
IT-VBFK force-pushed the fix/csproj-convert-version-var branch from 02e6f48 to 75c7270 Compare July 19, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI code Contains AI code enhancement New feature or request target/vCurrent Targets the current version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fallout.Migrate: Also recognize csproj variables

6 participants