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

source index not working because of %%var%% #678

Closed
ctaggart opened this issue Mar 9, 2015 · 11 comments
Closed

source index not working because of %%var%% #678

ctaggart opened this issue Mar 9, 2015 · 11 comments

Comments

@ctaggart
Copy link
Contributor

ctaggart commented Mar 9, 2015

image

ctaggart/SourceLink#62

The source index is ending up with a %%var2%% instead of %var2%. I haven't been able to reproduce locally yet. Any idea which version of the F# compiler is being used in these builds?

@ctaggart
Copy link
Contributor Author

ctaggart commented Mar 9, 2015

I was not able to reproduce the problem on my machine with the exact same commit.

git clone https://github.com/fsharp/FAKE.git
cd .\FAKE
git checkout 38986fb52c958529bb5f5eb7368807b1ae9be5e0
.\build.cmd buildsolution

Open build.fsx and remove or comment out SourceLink target: =?> ("SourceLink", isLocalBuild && not isLinux).

.\build.cmd sourcelink
srctool -x C:\tmp\FAKE\build\FakeLib.dll

Which version of fsc.exe gets used during the build? Here is mine:

ls -r 'C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\fsc.exe' | % versioninfo

image

@ctaggart
Copy link
Contributor Author

The navigate to source feature from Visual F# Power Tools works great with build.fsx scripts with FAKE 3.17.6. /cc @dungpa

The invalid %%var2%% has showed up in every build since version 3.17.9 starting on February 24th.

nuget install fake -version 3.17.7
nuget install fake -version 3.17.9
nuget install fake -version 3.17.11
nuget install fake -version 3.17.12
nuget install fake -version 3.17.13
nuget install fake -version 3.17.14
nuget install fake -version 3.18.0
nuget install fake -version 3.18.1
nuget install fake -version 3.18.2
nuget install fake -version 3.19.0
nuget install fake -version 3.19.1
srctool -x .\FAKE.3.17.7\tools\FakeLib.dll
srctool -x .\FAKE.3.17.9\tools\FakeLib.dll
srctool -x .\FAKE.3.17.11\tools\FakeLib.dll
srctool -x .\FAKE.3.17.12\tools\FakeLib.dll
srctool -x .\FAKE.3.17.13\tools\FakeLib.dll
srctool -x .\FAKE.3.17.14\tools\FakeLib.dll
srctool -x .\FAKE.3.18.0\tools\FakeLib.dll
srctool -x .\FAKE.3.18.1\tools\FakeLib.dll
srctool -x .\FAKE.3.19.0\tools\FakeLib.dll
srctool -x .\FAKE.3.19.1\tools\FakeLib.dll

Since this the sprintf happens when running the build script with FAKE and since FAKE uses fsi.exe to execute, I think the build system has an old version. To see the version of the dll, please run this build script .\FAKE.exe .\BugHunt.fsx on the machine used to do builds:

#r "FakeLib.dll"
open Fake
module FSIHelper =
    let fsiVersion = lazy (System.Diagnostics.FileVersionInfo.GetVersionInfo FSIHelper.fsiPath).FileVersion
Target "BugHunt" <| fun _ ->
    printfn "fsiPath: %s" FSIHelper.fsiPath
    printfn "fsiVersion: %s" FSIHelper.fsiVersion.Value
RunTargetOrDefault "BugHunt"

@dungpa
Copy link
Contributor

dungpa commented Mar 10, 2015

From a user's point of view, I prefer an alternative (String.Format, etc.) that doesn't depend on compiler/fsi/FSharp.Core versions. There is a plenty of machines out there with old versions for which the issue can slip through the cracks.

@forki
Copy link
Member

forki commented Mar 10, 2015

Only FAKE.deploy should use fsi. FAKE should still use FCS. Or did we Break that?

@forki
Copy link
Member

forki commented Mar 10, 2015

image

^^ on the machine where I do the FAKE releases.

@ctaggart
Copy link
Contributor Author

Can you upgrade to 3.1.2 on that machine? When you do, that script should print 4.31.30815.0.

3.1.1 is 4.31.30110.0, so that looks like it may be 3.1.0 which has the bug.

@ctaggart
Copy link
Contributor Author

FAKE 3.20.0 does not have a valid source index. :(

image

It is very cool to demo F12 Navigate to Source with a build.fsx when FAKE is source indexed.

forki added a commit that referenced this issue Mar 10, 2015
@forki
Copy link
Member

forki commented Mar 10, 2015

could you please retry with 3.20.1?
I installed F# 3.1.2
What is the expected behaviour?

@ctaggart
Copy link
Contributor Author

Yay!
image

@ctaggart
Copy link
Contributor Author

30 second clip. I'll need to improve my QuickTime/YouTube recording skills.
http://youtu.be/5n3TUqMiysk

@dungpa
Copy link
Contributor

dungpa commented Mar 11, 2015

@ctaggart Would you mind to add the video to the docs at https://github.com/fsprojects/VisualFSharpPowerTools/blob/master/docs/content/navigatetosource.fsx? I appreciate if you have something to improve the guide there.

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

No branches or pull requests

3 participants