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

F# support library build issue #1780

Closed
YezhouLiu opened this issue Jun 19, 2019 · 7 comments
Closed

F# support library build issue #1780

YezhouLiu opened this issue Jun 19, 2019 · 7 comments

Comments

@YezhouLiu
Copy link

Hi guys,

When I tried to build F# support library under ulib/fs folder, I got below errors.
Could you help me to have a look at it?

I'm using the released version of F* - fstar_0.9.6.0_Windows_x64.zip

D:\Fstar\ulib\fs>make
fsc --mlcompatibility -r:FSharp.Compatibility.OCaml.dll --nologo --nowarn:0086 -a prims.fs st.fs all.fs io.fs
prims.fs(14,21): error FS0039: The type 'Z' is not defined.
prims.fs(14,40): error FS0039: The type 't' is not defined.
prims.fs(14,44): error FS0039: The type 't' is not defined.
prims.fs(14,21): error FS0039: The type 'Z' is not defined.
prims.fs(14,40): error FS0039: The type 't' is not defined.
prims.fs(14,44): error FS0039: The type 't' is not defined.

If I need to execute F* code (with F#), is it a must for me to build the support library first?

Many thanks,
Steve

@catalin-hritcu
Copy link
Member

Generally the support for F# is quite a bit behind:
https://github.com/FStarLang/FStar/issues?q=is%3Aissue+is%3Aopen+fsharp+label%3Aarea%2Ffsharp-vs-ocaml
We can't even properly extract and build the "hello world" example:
#1087

@A-Manning might be able to give you a more precise answer

@mateuszbujalski
Copy link
Contributor

I've a fix to make the ulib/fs compile again. I'm planning to set up a pull request for that, however before I do I wanted to ask some questions.

Currently there's an (outdated) makefile for compiling this library. On the other hand, the fstar compiler provides a solution file for working with .net. What's the preferred build tool for this?

In general compiling ulib/fs requires a .net development environment, so a solution file could work fine. It would also make nuget dependencies easier to handle (currently there's just one dependency though). On the other hand I don't know the project very well and most likely I'm not aware of various restrictions (e.g. CI, other users?).

@nikswamy
Copy link
Collaborator

If it could be integrated with the .sln file, that would be great. Thanks!

@nikswamy
Copy link
Collaborator

We could just have an additional fsproj added in the sln file for building the library

@mateuszbujalski
Copy link
Contributor

mateuszbujalski commented Apr 24, 2020

I thought that I should keep ulib and the F* solution separate. If you say that building them together is fine, that makes it easier actually :)

Few more questions:

  1. Is it ok to update solution and projects to VS2019 and migrate to SDK projects?
  2. Since the project is meant to be cross-platform, I was wondering about setting a target framework to .netstandard1.1 (roughly equivalent to the net4.5 used currently). I don't think F* relies on any platform specific .net APIs, so it should be straighforward. Would there be a problem with that?
  3. Are there any requirements around F# version used? I don't think there is any point in upgrading it as the syntax and features are restricted with what F* allows anyway. So I believe the best approach would be to target the lowest FSharp.Core possible.

@nikswamy
Copy link
Collaborator

Upgrading to VS2019: We discussed this recently and it is a problem. @tahina-pro Can you explain the difficulties, please?

For 2 and 3, yes, lowest possible dependences make sense

@nikswamy
Copy link
Collaborator

Thanks @mateuszbujalski!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants