-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Always fully build Components.Server.csproj #9421
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
eng/scripts/CodeCheck.ps1
Outdated
@@ -130,6 +130,11 @@ try { | |||
& $dotnet run -p "$repoRoot/eng/tools/BaselineGenerator/" | |||
} | |||
|
|||
Write-Host "Re-generating blazor files" |
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.
@SteveSandersonMS we're looking at a solution where the the blazor files are checked in to the source and we add a check, the same way we verify ref assemblies are up to date, to ensure these files are up to date. It is slightly ugly to check in the files, but it does make reasoning about these files a bit easier.
What do you think?
b2c21f0
to
8e4af56
Compare
<!-- We need .Browser.JS to build first so we can embed its .js output --> | ||
<EmbeddedResource Include="..\..\Browser.JS\src\dist\blazor.server.js" LogicalName="_framework\%(Filename)%(Extension)" /> | ||
<EmbeddedResource Include="..\..\Browser.JS\dist\$(Configuration)\blazor.server.js" LogicalName="_framework\%(Filename)%(Extension)" /> |
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.
@pranavkm Is this the fix for #9402 (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.
Yup. See #9421 (comment) - it essentially checks in the js files and adds a check to ensure that the build isn't broken. I wanted to verify things work correctly and that the code check correctly identifies if we failed to update it before I made this non-draft.
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.
I support this approach. It's also a workaround for needing to make NodeJS a prerequiste to building aspnetcore on all platforms we build. In some environments, we don't have NodeJS and it might be difficult to add as a new pre-req.
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.
WRT the Mac OSX blazor.server.js fix
<!-- | ||
Temporary until we move the prerendering APIs into this assembly. | ||
--> | ||
<Reference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" /> |
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.
@javiercn I tried removing this and it worked. So I'm guessing this was left over from the pre-rendering work.
src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj
Outdated
Show resolved
Hide resolved
<!-- We need .Browser.JS to build first so we can embed its .js output --> | ||
<EmbeddedResource Include="..\..\Browser.JS\src\dist\blazor.server.js" LogicalName="_framework\%(Filename)%(Extension)" /> | ||
<EmbeddedResource Include="..\..\Browser.JS\dist\$(Configuration)\blazor.server.js" LogicalName="_framework\%(Filename)%(Extension)" /> |
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.
I support this approach. It's also a workaround for needing to make NodeJS a prerequiste to building aspnetcore on all platforms we build. In some environments, we don't have NodeJS and it might be difficult to add as a new pre-req.
src/Components/Browser.JS/Microsoft.AspNetCore.Components.Browser.JS.npmproj
Outdated
Show resolved
Hide resolved
* Use pre-built js files instead of building on the fly * Use a sourcemap file for Debug. .gitignore sourcemap files * Install nodejs on CodeCheck agents
87d288b
to
5368bb5
Compare
@@ -3,13 +3,13 @@ const webpack = require('webpack'); | |||
|
|||
module.exports = (env, args) => ({ | |||
resolve: { extensions: ['.ts', '.js'] }, | |||
devtool: args.mode === 'development' ? 'inline-source-map' : 'none', | |||
devtool: args.mode === 'development' ? 'source-map' : 'none', |
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.
inline-source-map
is problematic because I'd like to check in the Debug js too. Putting it in a separate source-map which is gitignored works reasonably well. If you happen to need it, you build Browser.JS locally and you get source maps. Does this seem reasonable @javiercn \ @SteveSandersonMS ?
…er.csproj Co-Authored-By: pranavkm <[email protected]>
Fixes #9402