You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression on SDK 5.0.300: When using an identifier like __SOURCE_DIRECTORY__ in a type parameter one get FS3045 compilation error. #11610
Tagging @vzarytovskii, we use __SOURCE_DIRECTORY__ quite heavily in our test scripts, and in our .NET 6 build of the repo these don't fail. So we'll want to determine if this is actually us, or if there was some regression that slipped into the most recent .NET SDK.
Interestingly, enough, it seems to be not working in the given type provider, but works fine in, for example, attributes.
__SOURCE_DIRECTORY__ has a special treatment by the lexer (it is essentially a compiler-generated literal), which turns into path |> GetDirectoryName() call:
@CaptnCodr i think we merged it after 5.0.301 was preparing for release, unfortunately :( @cartermp do you know when it may be released? Not sure if we got it into 16.11/16.10 (I don't see any merges since the fix landed in main, on dev17).
Note that our insertions for dev17 aren't working yet, so we're quite a bit behind. And there's no autoamtic insertions into 16.11, so we need to service the fix.
Reacted by Vlad Zarytovskii, Constantin Tews and nhirschey
Activity
nbevans commentedon May 28, 2021
Seeing something similar in a .fsx
cartermp commentedon May 29, 2021
Self-assigning myself to triage and determine if there was a regression when the holiday is over.
cartermp commentedon Jun 3, 2021
Confirmed regression, this breaks numerous scripts
cartermp commentedon Jun 4, 2021
Tagging @vzarytovskii, we use
__SOURCE_DIRECTORY__quite heavily in our test scripts, and in our .NET 6 build of the repo these don't fail. So we'll want to determine if this is actually us, or if there was some regression that slipped into the most recent .NET SDK.vzarytovskii commentedon Jun 4, 2021
Interestingly, enough, it seems to be not working in the given type provider, but works fine in, for example, attributes.
__SOURCE_DIRECTORY__has a special treatment by the lexer (it is essentially a compiler-generated literal), which turns intopath |> GetDirectoryName()call:fsharp/src/fsharp/lexhelp.fs
Lines 375 to 399 in b1fa258
I am going to see why it is not available when running a type provider.
It is interesting, though, that it regressed from 5.0.203.
Edit: this may be a related change: b1fa258#diff-c2bb91ab9348d741a90e5e1774d06a000d1613b6a50e47af8a24cdcd60cb1217
Fix for #11610 + bump SDK to 5.0.300 (#11633)
CaptnCodr commentedon Jun 16, 2021
When is this fix available? I have v5.0.301 installed and get this error.
#3: Use Paket as package manager. - Workaround for dotnet/fsharp#11610.
vzarytovskii commentedon Jun 16, 2021
@CaptnCodr i think we merged it after 5.0.301 was preparing for release, unfortunately :(
@cartermp do you know when it may be released? Not sure if we got it into 16.11/16.10 (I don't see any merges since the fix landed in main, on dev17).
cartermp commentedon Jun 16, 2021
Should be in the next month, so long as the SDK also releases around then.
cartermp commentedon Jun 16, 2021
Note that our insertions for dev17 aren't working yet, so we're quite a bit behind. And there's no autoamtic insertions into 16.11, so we need to service the fix.
Swoorup commentedon Jul 16, 2021
Looks like isn't fixed for 5.0.302 as well?
vzarytovskii commentedon Jul 16, 2021
Good question. I'm not entirely sure what went into 302. @KevinRansom @brettfo what's the easiest way to tell which commit 302 is?
nhirschey commentedon Aug 13, 2021
This is still broken in 5.0.400.
dsyme commentedon Aug 13, 2021
@nhirschey Yes it looks like the fix isn't in the release branch for 16.11, which is a shame
https://github.com/dotnet/fsharp/commits/release/dev16.11
We're after this commit: 78826fd
The fix will certainly be in .NET 6.0