Skip to content

Conversation

@pranavkm
Copy link
Contributor

@pranavkm pranavkm commented Jan 20, 2021

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.

@ghost
Copy link

ghost commented Jan 20, 2021

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.

@pranavkm pranavkm added the Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch label Jan 20, 2021
@pranavkm pranavkm force-pushed the prkrishn/static-files branch 2 times, most recently from dd739d8 to bdf3347 Compare January 21, 2021 00:07
@pranavkm pranavkm marked this pull request as ready for review January 21, 2021 01:36
}

function updateAllLocalCss() {
[...document.querySelectorAll('link')]
Copy link
Member

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()}`;
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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; }
Copy link
Member

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?

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@jkotalik jkotalik left a 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; }
Copy link
Contributor

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?

Copy link
Contributor Author

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

@pranavkm pranavkm force-pushed the prkrishn/static-files branch from 8fffe5f to 89d9a4c Compare January 22, 2021 19:10
@pranavkm pranavkm added auto-merge Automatically merge PR once CI passes. Auto-Merge If Tests Pass labels Jan 22, 2021
@ghost
Copy link

ghost commented Jan 22, 2021

Hello @pranavkm!

Because this pull request has the Auto-Merge If Tests Pass label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@ghost
Copy link

ghost commented Jan 22, 2021

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:

  1. DotNet Maestro - Int
  2. Codecov
  3. DotNet Maestro
  4. Dependabot

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 this
From the bot dev team

We'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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch Auto-Merge If Tests Pass auto-merge Automatically merge PR once CI passes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants