Skip to content
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

Fix #nowarn "2003" not working - #3139 #4480

Merged
merged 10 commits into from
Apr 19, 2018
Merged

Conversation

matthid
Copy link
Contributor

@matthid matthid commented Mar 10, 2018

Fixes #3139, by moving the warning emit of the warning into the type-checking phase. In detail the behavior changes are:

  • Make sure the warning is triggered always (not only when AssemblyVersionAttribute is present)
  • Make sure warning can be disabled via #nowarn "2003"
  • Include the correct range of the problematic string

This means now warnings are emitted as:

AssemblyInfo.fs(5,38): warning FS2003: An System.Reflection.AssemblyVersionAttribute specified version '5.0.0asdas', but this value is invalid and has been ignored

while previously they did not contain any range information

warning FS2003: An System.Reflection.AssemblyVersionAttribute specified version '5.0.0asdas', but this value is invalid and has been ignored

Also the ordering of the warnings might have changed. In order to compensate for the changed tests in ProductVersion.fs I added now ones in tests/fsharp/tests.fs.

matthid added 3 commits March 10, 2018 12:48
- Make sure the warning is triggered always (not only when AssemblyVersionAttribute is present)
- Make sure warning can be disabled via #nowarn 2003
- Include the correct range of the problematic string
@matthid
Copy link
Contributor Author

matthid commented Mar 10, 2018

The Ubuntu16.04 failure in 5999fb6 is unrelated The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/strawberryperl64/5.22.2.1/strawberryperl64.5.22.2.1.nupkg' has timed out after 100000ms., it is already reported here: #3253

Seems like it was some temporary NuGet problem...

@matthid matthid changed the title Fix issue #3139 Fix #nowarn "2003" not working - #3139 Mar 10, 2018
@matthid
Copy link
Contributor Author

matthid commented Mar 10, 2018

Seems like AssemblyVersionAttribute was previously reported via simple name and System.Reflection.AssemblyInformationalVersionAttribute and System.Reflection.AssemblyFileVersionAttribute via full name.

Should we fix that here?

@matthid
Copy link
Contributor Author

matthid commented Mar 10, 2018

the ubuntu failure is not related, seems like nuget is on vacation this weekend

@dsyme
Copy link
Contributor

dsyme commented Mar 12, 2018

@dotnet-bot Test Ubuntu16.04 Release_default Build please

Copy link
Contributor

@dsyme dsyme left a comment

Choose a reason for hiding this comment

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

Minor changes requested

@matthid
Copy link
Contributor Author

matthid commented Mar 14, 2018

@dsyme should be use a negXX test here as well?

@matthid
Copy link
Contributor Author

matthid commented Mar 14, 2018

@dsyme OK I got it working again with the new message :)

@matthid
Copy link
Contributor Author

matthid commented Apr 12, 2018

@dsyme Is there still something blocked on my side? At least initially it looked simple enough

@KevinRansom
Copy link
Member

@matthid Thank you for this

@KevinRansom KevinRansom merged commit fa1c97f into dotnet:master Apr 19, 2018
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.

3 participants