-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tolerate plugins with warnings (#437)
Found this while on my adventures with dotnet plugins. If your plugin project has any warnings it's unusable in shimless mode (i.e. `RunPlugin`) because msbuild would first print the warning then start the plugin and print the port number. This lead to errors like: ``` error: plugin [E:\VisualStudio\Projects\pulumi\jsonschema\Provider\pulumi-resource-Provider] wrote an invalid port to stdout: could not parse port: strconv.Atoi: parsing "E:\\VisualStudio\\Projects\\pulumi\\jsonschema\\Provider\\Provider.fsproj : warning NU1903: Package 'System.Text.Json' 6.0.2 has a known high severity vulnerability, GHSA-8g4q-xg66-9fp4": invalid syntax ``` When running shimless these warnings don't really matter. So this PR rewrites `RunPlugin` to do the build separately, and then invoke `dotnet run` with the `--no-build` flag. I would have preferred to _just_ use `dotnet run` but there doesn't seem to be anyway to pass it flags to silence the msbuild output from it. This is tested by adding a warning to the testprovider project that always triggers. As we use the testprovider project in shimless mode in the integration tests this shows that a project with warnings can still be used.
- Loading branch information
Showing
5 changed files
with
59 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
component: runtime | ||
kind: Improvements | ||
body: Plugins with msbuild warnings can still be run | ||
time: 2024-12-20T22:28:08.41871359Z | ||
custom: | ||
PR: "437" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters