Giter Site home page Giter Site logo

Comments (6)

migueldeicaza avatar migueldeicaza commented on July 20, 2024

Sounds like shoudlWrap is wrong in the first place

On Mon, Aug 29, 2011 at 4:01 PM, mithunder <
[email protected]>wrote:

I have encountered a path error on Windows 7, and found a possible
solution. When trying to compile, the compiler gives an error over the
following paths:

-r:C:\Program Files (x86)\FSharp-2.0.0.0\bin\FSharp.Core.dll
-r:"C:\Program Files (x86)\FSharp-2.0.0.0\bin\FSharp.Core.dll"

The first line seems to be the problem, not wrapping the line. I solved the
issue by replacing line 299 in src/Services/Common.fs:

let wrapf = if shouldWrap then wrapFile else id

with

let wrapf = if shouldWrap then wrapFile else wrapFile

and getting

-r:"C:\Program Files (x86)\FSharp-2.0.0.0\bin\FSharp.Core.dll"
-r:"C:\Program Files (x86)\FSharp-2.0.0.0\bin\FSharp.Core.dll"

thus ensuring it is always wrapped. I have tested the solution on Debian
and Windows 7, and it seems to work fine. If the fix is fine, I would
suggest it is committed to master.

Reply to this email directly or view it on GitHub:
#21

from zarchive-fsharpbinding.

mithunder avatar mithunder commented on July 20, 2024

Yeah, it seems plausible. I don't know under which circumstances it would be useful to have an unquoted path instead of a quoted path, but having only quoted paths worked fine on Debian and Windows 7.

from zarchive-fsharpbinding.

tpetricek avatar tpetricek commented on July 20, 2024

The wrapping of paths is not done in the 'generateCompilerOptions' function, which is used in CompilerService.fs (to generate command line options for the compiler) and in LanguageService.fs (to call the service provided by F# compiler to do the IntelliSense).

In the first case, it would be probably correct to wrap the file name. In the second case, I'm not 100% sure. I think the IntelliSense may fail to load assemblies if it gets wrapped path. I suggest you modify the patch to only wrap the path when the function is called from CompilerService.fs.

from zarchive-fsharpbinding.

mithunder avatar mithunder commented on July 20, 2024

I don't know how the IntelliSense handles wrapped and unwrapped paths, so you might be right. In any case, I implemented your suggested modifications (wrapping in Compiler, not wrapping in Language), and the compiling as well as the IntelliSense seems to work fine when I test it on Debian and Windows 7. Would you like the diffs per email, or here in the thread?

from zarchive-fsharpbinding.

mithunder avatar mithunder commented on July 20, 2024

I've set up a pull request containing the changes.

from zarchive-fsharpbinding.

tpetricek avatar tpetricek commented on July 20, 2024

The pull request looks good - thanks for submitting it! I merged it with the master branch.

from zarchive-fsharpbinding.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.