Skip to content

Ease builds on CI and locally #364

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

Merged
merged 5 commits into from
Nov 19, 2022

Conversation

dougbu
Copy link
Contributor

@dougbu dougbu commented Nov 18, 2022

  • react to a smallish breaking change in newer Owin packages
  • gather more information when restoring RuntimePortable.sln
    • use $(RestoreUseSkipNonexistentTargets) as well
  • ignore binary logs
  • ensure the .NET Core 2.1 VS component is installed
    • allow use of any 2.1.5xx .NET SDK
  • add a few words to code analysis dictionary
  • exclude files generated for net45 legacy projects don't cause problems when compiling for netstandard2.0
  • handle additional ReflectionTypeLoadExceptions when using the xUnit msbuild runner

- react to a smallish breaking change in newer Owin packages
- gather more information when restoring RuntimePortable.sln
  - use `$(RestoreUseSkipNonexistentTargets)` as well
- ignore binary logs
- ensure the .NET Core 2.1 VS component is installed
  - allow use of any 2.1.5xx .NET SDK
- add a few words to code analysis dictionary
- exclude files generated for `net45` legacy projects don't cause problems when compiling for `netstandard2.0`
- handle additional `ReflectionTypeLoadException`s when using the xUnit `msbuild` runner
@dougbu dougbu requested review from MackinnonBuck, TanayParikh and a team November 18, 2022 23:29
@dougbu
Copy link
Contributor Author

dougbu commented Nov 18, 2022

Building on TeamCity for validation

Copy link

@TanayParikh TanayParikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't have too much context here, but looks good overall. Few quick comments.

@@ -429,7 +429,7 @@ public async Task Invoke_BuildsUriWithHostAndPort()
[InlineData(@"-_.~+""<>^`{|}")]
// random unicode characters
[InlineData("激光這")]
[InlineData("%24")]
[InlineData("%24", Skip="Decoded to '$' at the moment. !!! Investigate !!!")]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we link an issue here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tratcher is this related to a known breaking change in the underlying Owin packages❔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. What versions did you update from and to?

'$' is not a reserved character in request paths, it's supposed to be un-escaped.

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 went from Microsoft.Owin v2.0.2 to v4.2.2

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe aspnet/AspNetKatana@7db01eb, but that was 4.0.0, years ago.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense given how aged our dependency was. I'll create a Invoke_CreatesUri_ContainingCorrectlyDecodedStrings(string encoded, string decoded) alternative to this test. Will include [InlineData("%24", "$")]. Do you have a suggestion or two for additional encodings that should be decoded when presented to the application❔

Copy link
Member

@Tratcher Tratcher Nov 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.rfc-editor.org/rfc/rfc3986#appendix-A
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I saw that BNF and realized the comments w/ the [TheoryData(...)] above are pretty off-base. Decided to just test percent encodings of $, (, ), [, ], {, and } rather than recategorizing things here.

@dougbu
Copy link
Contributor Author

dougbu commented Nov 19, 2022

This PR is sufficient for successful WSR builds on TeamCity; should be enough for successful builds on AzDO (w/ VS 2017) as well. I need to make TFS changes (related to recent Microsoft.Owin version bumps in this repo) to make TC builds entirely successful.

@dougbu dougbu merged commit 871710e into aspnet:main Nov 19, 2022
@dougbu dougbu deleted the dougbu/Newtonsoft.Json.part1 branch November 19, 2022 23:34
wtgodbe pushed a commit that referenced this pull request Nov 21, 2022
 react to a smallish breaking change in newer Owin packages
  - add new test of `%` decoding to URI
- do not restore RuntimePortable.sln directly
  - NuGet.exe is no longer happy w/ that solution
- ignore binary logs
- ensure the .NET Core 2.1 VS component is installed
  - allow use of any 2.1.5xx .NET SDK
- add a few words to code analysis dictionary
- exclude files generated for `net45` legacy projects don't cause problems when compiling for `netstandard2.0`
- handle additional `ReflectionTypeLoadException`s when using the xUnit `msbuild` runner

nits:
- capitalize "MSBuild" consistently
- reduce indentation slightly
@dougbu dougbu added this to the 3.3.0 (5.3.0) milestone Feb 26, 2023
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.

4 participants