Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6014fe2

Browse files
authored
Fixes: #4822 --- Support for arbitrary value in AssemblyInformationalVersionAttribute (#5336)
* remove TypeChecker validation* update testcase baselines* Update fsharpqa tests* Feedback* Update nowarn test
1 parent31495eb commit6014fe2

File tree

6 files changed

+2
-14
lines changed

6 files changed

+2
-14
lines changed

‎build/targets/GenerateAssemblyAttributes.targets‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
<PropertyGroup>
2828
<GeneratedFSharpAssemblyVersionFile>$(IntermediateOutputPath)$(MSBuildProjectName).AssemblyVersion$(DefaultLanguageSourceExtension)</GeneratedFSharpAssemblyVersionFile>
29-
<!-- AssemblyInformationalVersionAttribute issues a by-design warning if the value passed isn't of the form #.#.#.#, but we specifically want to suppress this to allow the commit hash to be embedded.-->
30-
<NoWarnCondition="'$(Language)' == 'F#'">2003;$(NoWarn)</NoWarn>
3129
</PropertyGroup>
3230

3331
<PropertyGroup>

‎src/fsharp/TypeChecker.fs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17293,7 +17293,6 @@ let TypeCheckOneImplFile
1729317293
try IL.parseILVersion version |> ignore; true
1729417294
with _ -> false
1729517295
match attrName with
17296-
| "System.Reflection.AssemblyInformationalVersionAttribute"
1729717296
| "System.Reflection.AssemblyFileVersionAttribute" //TODO compile error like c# compiler?
1729817297
| "System.Reflection.AssemblyVersionAttribute" when not (isValid()) ->
1729917298
warning(Error(FSComp.SR.fscBadAssemblyVersion(attrName, version), range))
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
namespaceSystem
22
openSystem.Reflection
33

4-
[<assembly: AssemblyVersionAttribute("5.0.0")>]
5-
64
do()
75

86
namespaceSystem
97
openSystem.Reflection
108
#nowarn"2003"
119

12-
[<assembly: AssemblyInformationalVersion("5.0.0-beta024")>]
10+
[<assembly: AssemblyVersion("5.0.0-beta024")>]
11+
1312
do()

‎tests/fsharp/core/versionAttributes/out.stderr.bsl‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@ Test 2=================================================
66
NoWarn2003_2.fs(8,6): warning FS0988: Main module of program is empty: nothing will happen when it is run
77
Test3=================================================
88

9-
Warn2003_1.fs(5,42): warning FS2003: The attribute System.Reflection.AssemblyInformationalVersionAttribute specified version '5.0.0-beta024', but this value is invalidand has been ignored
10-
119
Warn2003_1.fs(7,6): warning FS0988: Main module of program is empty: nothing will happen when it is run
1210
Test4=================================================
1311

14-
Warn2003_2.fs(4,42): warning FS2003: The attribute System.Reflection.AssemblyInformationalVersionAttribute specified version '5.0.0-beta024', but this value is invalidand has been ignored
15-
1612
Warn2003_2.fs(6,6): warning FS0988: Main module of program is empty: nothing will happen when it is run
1713
Test5=================================================
1814

‎tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/X_AssemblyVersion01.fs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// #Regression #Conformance #DeclarationElements #Attributes
2-
//<Expects id="FS2003" status="warning">The attribute System.Reflection.AssemblyInformationalVersionAttribute specified version '6\.5\.4\.3\.2', but this value is invalid and has been ignored</Expects>
32
//<Expects id="FS2003" status="warning">The attribute System.Reflection.AssemblyFileVersionAttribute specified version '9\.8\.7\.6\.5', but this value is invalid and has been ignored</Expects>
43

54
[<assembly:System.Reflection.AssemblyVersion("1.2.3.4")>]
6-
[<assembly:System.Reflection.AssemblyInformationalVersion("6.5.4.3.2")>]
75
[<assembly:System.Reflection.AssemblyFileVersion("9.8.7.6.5")>]
86
do
97
()

‎tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/X_AssemblyVersion02.fs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// #Regression #Conformance #DeclarationElements #Attributes
2-
//<Expects id="FS2003" status="warning">The attribute System.Reflection.AssemblyInformationalVersionAttribute specified version '6\.5\.\*\.3', but this value is invalid and has been ignored</Expects>
32
//<Expects id="FS2003" status="warning">The attribute System.Reflection.AssemblyFileVersionAttribute specified version '9\.8\.\*\.6', but this value is invalid and has been ignored</Expects>
43

54
[<assembly:System.Reflection.AssemblyVersion("1.2.3.4")>]
6-
[<assembly:System.Reflection.AssemblyInformationalVersion("6.5.*.3")>]
75
[<assembly:System.Reflection.AssemblyFileVersionAttribute("9.8.*.6")>]
86
do
97
()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp