Skip to content

Conversation

javiercn
Copy link
Member

@javiercn javiercn commented Sep 16, 2025

Description

Recursive glob patterns like **/*.razor.js and **/*.cshtml.js produced an incorrect relative path for files whose base name contained multiple dots.

For example, for a pattern like:
Pattern: **/*.razor.js
Path: Components/User.Profile.Details.razor.js
Stem (incorrect): User.Profile.Details.razor.js (directory portion lost)

Fixes #50840

Customer Impact

Without this fix, any file with multiple extensions that is filtered during build time processing receives incorrect relative paths which translates in harder to debug issues later during build or at runtime. For example, the file will be served from the wrong file path during runtime.

Regression?

  • Yes
  • [] No

9.0

Risk

  • High
  • Medium
  • Low

Justification: Change is localized to preserving a single integer
(StemStartIndex) across extension matching. No algorithmic branching
added; existing broad test suite plus new targeted cases all pass.

Verification

  • Manual
  • Automated

Added tests for the problematic cases and additional tests for variations of the pattern.

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@javiercn javiercn force-pushed the javiercn/js-modules-with-dots branch from 867bbf3 to 7f8d0f0 Compare September 16, 2025 11:56
@javiercn
Copy link
Member Author

/backport to main

Copy link
Contributor

Started backporting to main: https://github.com/dotnet/sdk/actions/runs/17767118227

@baronfel
Copy link
Member

@javiercn you shouldn't need to explicitly backport to main - we have automation to merge release/10.0.1xx forward to main.

@javiercn
Copy link
Member Author

@baronfel I thought that wasn't the case. I'll close the backport then.

@baronfel
Copy link
Member

No worries, just hoping to save you some work. The codeflow definitions are kept in this repo at

https://github.com/dotnet/sdk/blob/main/github-merge-flow.jsonc#L29

if you ever need to reference them in the future.

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.

3 participants