-
Notifications
You must be signed in to change notification settings - Fork 319
Conversation
switch to strong names for compiler binaries and update the bootstrap compiler with those names. The strong names are based on src\fsharp\test.snk this means the strong name for FSharp.Compiler.dll changes, but no one should be depending on that and the new names are useful as the won't collide with the visual studio versions of these DLLs on windows. The monodevelop binding is neutral to the strong names used. we still compile FSharp.Core as delay-signed-with-the-microsoft-key-and-then-mono-key-signed which Mono recognizes as strong named but i think windows does not. We have to use this identity for FSHarp.Core to keep binary compatibility with Windows-compiled thing like type provider DLLs. We may have to use the Microsoft FSHarp.Core.dll on Windows, i think it gets picked up automatically from the GAC but need to check tomorrow. also fixes bugs in ilsupp.fs in strong nae signing. tested by bootstrapping, and manually examining the names on the dlls.
The FSharp.Core in lib/bootstrap/4.0 needs to be properly strong name signed if we'r going to run on Windows without VS installed and without FSharp.Core in the GAC
See fsharp#50 The comments in FSharpBuild/Fsc.fs explain a bit more. It is realy hard to work out how to make this perfectly consistent. Essentially, be careful using resources in folders if you want your projects to be portable across VisualStudio/MSBuild and mono/MonoDevelop/XBuild We hit this bug in fsharp/fsharpbinding, but we've moved that to no longer put resources in folders for now.
In case you need a clarification wrt bloat: http://tirania.org/blog/archive/2012/Oct-20.html
Mono version 2.11.5 was never released and was actually renamed to 3.0
This gives documentation for FSharp.Core.dll in MonoDevelop
Fixed a typo in the README
This includes adding dependencies for the Mono profile 2.1 binaries we need to reference
the trouble with not normalizing we see occasionally on files just randomly differ on every single line. It's not a huge problem, more like a caveat. |
I did the and it made the history really pretty, check it out in my repo |
@DanielFabian : agreed, but what I have a problem is what to normalize to? IMHO it should be Windows line-endings, otherwise you would translate the same problem to the other way around: when you change something in an msbuild file (.sln, .csproj, .fsproj) via MonoDevelop, you will see the whole file changing. Cannot you use text=auto but using Windows line endings? |
well, no. What it |
Do play a bit with my branch, maybe https://github.com/DanielFabian/fsharp/commits/master it really did clean up the history. Maybe play a bit with |
What's the status here? Do people think this should be merged? I think its good to normalize line the endings in GitHub - is this commit the best way to do it? |
I agree that the line endings should be normalized. I think the only concern is what they will be when checked out. This will default, as @DanielFabian says, to the line ending of your platform, but can be changed if desired in your .gitconfig. The only reason I can think of for doing this would be to do a diff with Codeplex for example, and this isn't too bad for a one-off event. Rebasing cleans up the history, so this really solves the problem for good. @knocte: Monodevelop could only be a problem if it reads a .fsproj with unix line endings and then saves it with windows line endings. Surely this isn't the behaviour? |
@rneatherway : that is the behaviour, it's what I've tried to explain |
|
You would need that for SLN files as well. |
Right, that wasn't clear before. So Monodevelop does this for all files including *.cs, *.fs? It would seem pretty strange behaviour for it to only change *.{fsproj,csproj,sln}. |
It only changes msbuild files because that's what it needs to do to be fully interoperable with VS. VS saves all msbuild files with CRLF, but it doesn't do it with the rest unless you tell it to. |
Thanks, I see. So two options then:
|
There can be a thrid option derived from the 2nd that is not so harsh: |
And when I said "all files" I meant "all files modified in the commit". Just in case someone is thinking this solution hurts performance... |
This seems like a reasonable solution. |
@knocte I don't yet repro this behaviour where MD saves all .fsproj files as CRLF. Maybe I'm doing something wrong, but I tried this on OSX with 3.0.5:
The file stayed the same "unix" length after the edit. I then did the same on the "dos" file and it seemed to convert to "unix" endings (the file became shorter) In any case, I don't think this repo should use CRLF line endings just because of the behaviour of one particular development tool (MD), which to be honest isn't even used very much AFAIK when editing the compiler. To me, "auto" line endings look like the simplest and best choice to keep things sane on the different systems. |
@dsyme : TBH I haven't tried with *.fsproj files specifically. I just know this is the behaviour of MD with msbuild files in general (which maybe only applies to *.csproj files, and the FSharpBinding decided not to mimic this). In regards to the argument of MD not being used much in fsharp compiler: fair enough. But maybe this argument doesn't apply so much to other modules such as FSharpBinding? |
BTW, if FSharpBinding indeed has this behaviour, I would consider it a bug (otherwise it would generate lot of noise when working with F# projects which were originally created in Windows). |
Throwing in some technical aspects of Git itself. (I personally prefer 1) but that doesn't matter here) Note that the normalization of the complete git history as discussed above and tried by @DanielFabian causes some havoc among all forks as well, although that's just once, then it is done and fine. Forks essentially need to reset to the new master. It is still possible to cherry-pick from the old history afterwards (e.g. for pending pull requests), but we should never merge between them.
A complete .gitattributes could then look like:
|
Then let's just go for (1). That means merging this pull request and adjsuting the .gitattribute, right? @DanielFabian - do you know why this pull request is labelled "cannot be automatically merged"? |
I'm not 100% sure, but most likely, because I ran the script I mentioned Maybe just run my script locally and make a 'push -f' to force an overwrite |
The repository has now been normalized to Unix and "text auto", and a .gitattributes like put in place like the one described by @cdrnet. Thanks everyone and lets see how this goes. |
closing this since it has been don by direct commit |
…ifiers. Related to #78 - without this restriction, the typechecker can't distinguish between valid pipes separating cases and invalid pipes that are embedded in a case identifier. The result is that nonsense like this compiles, when it should not: let (|``Foo|Bar``|) x = match x with | 0 -> Foo | _ -> Bar match 42 with | Foo -> "foo" | Bar -> "bar" (changeset 1282321)
After setting
text=auto
in #75, it would make sense to once normalize all files that are not normalized yet. Thereafter all new files will always have the same line endings which will help the diff and is also good for consistency between platforms.