-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add support for static files to dotnet-watch #15405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
dd739d8 to
bdf3347
Compare
| } | ||
|
|
||
| function updateAllLocalCss() { | ||
| [...document.querySelectorAll('link')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nit: We might want to filter by rel='stylesheet' to avoid selecting links to non-stylesheet assets.
Probably an edge case so feel free to ignore.
|
|
||
| const newElement = styleElement.cloneNode(); | ||
| const href = styleElement.href; | ||
| newElement.href = href.split('?', 1)[0] + `?nonce=${Date.now()}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a chance href.split('?', 1) can be empty?
| namespace Microsoft.DotNet.Watcher.Tools | ||
| { | ||
| internal static class AssertEx | ||
| public static class AssertEx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we changing the visibility here?
| PackagePath="tools\$(SdkTargetFramework)\any\middleware" /> | ||
| </ItemGroup> | ||
| </Target> | ||
| <ProjectReference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏽
| public ProcessSpec ProcessSpec { get; set; } | ||
|
|
||
| public IFileSet FileSet { get; set; } | ||
| public FileSet FileSet { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we want to use the concrete type instead of the interface here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind. I see that the interface was removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a POCO type, there's really no need for there to be an interface and a concrete implementation. Kinda gets in the way since you have to update two places every time you make a change to the contract here.
jkotalik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The FileSetSerializer is the only new par of this PR correct?
LGTM otherwise.
| { | ||
| public ITaskItem[] WatchFiles { get; set; } | ||
|
|
||
| public bool IsNetCoreApp31OrNewer { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder where this is used again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use it to determine if we can inject the browser refresh middleware. It compiles against netcoreapp3.1 so we have to make sure it's at least that
8fffe5f to
89d9a4c
Compare
|
Hello @pranavkm! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
Apologies, while this PR appears ready to be merged, I've been configured to only merge when all checks have explicitly passed. The following integrations have not reported any progress on their checks and are blocking auto-merge:
These integrations are possibly never going to report a check, and unblocking auto-merge likely requires a human being to update my configuration to exempt these integrations from requiring a passing check. Give feedback on thisFrom the bot dev teamWe've tried to tune the bot such that it posts a comment like this only when auto-merge is blocked for exceptional, non-intuitive reasons. When the bot's auto-merge capability is properly configured, auto-merge should operate as you would intuitively expect and you should not see any spurious comments. Please reach out to us at [email protected] to provide feedback if you believe you're seeing this comment appear spuriously. Please note that we usually are unable to update your bot configuration on your team's behalf, but we're happy to help you identify your bot admin. |
This is largely a port of dotnet/aspnetcore#27744 with one large difference - I added an MSBuild task to serialize the list of files from MSBuild -> dotnet-watch. In the PR this was done by relying on CLI parsing.