Some warnings may be discarded using #load with forward slash path separators #1240
Labels
Area-FSI
Bug
Impact-Low
(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
I noticed this issue while reproducing #1126: using forward slashes in the path for
#load "c:/temp/nada.fsx"
suppressed the warning in FSI when it seems it shouldn't have.https://github.com/Microsoft/visualfsharp/blob/master/src/fsharp/CompileOps.fs#L5001
The file path comparison doesn't "normalize" the path separators, so
rootFilename
still has forward slashes whilem.FileName
doesn't, and warnings later get filtered byisRootRange
.Repro steps
To reproduce, create a file, say
C:\temp\nada.fsx
containingAnd then run the following in F# Interactive:
Expected behavior
I think the warning should've (erroneously, according to #1126 and #1239) appeared whether using backward or forward slashes with
#load
.Actual behavior
Warning doesn't appear as it does when using backslashes in path.
Known workarounds
Don't use forward slashes in
#load
paths.Related information
The repro steps for this issue will no longer work if #1239 is merged, but I think the issue will still exist.
The text was updated successfully, but these errors were encountered: