Closed enricosada closed 7 years ago
@enricosada this is great, thank you! Looking forward to digging in.
I'll check appveyor failure.
Btw @stephen-swensen any issue, feel free to ping me or #dotnetcore fsharp.org slack channel
sry, locally i have an error with portable profile with msbuild (maybe i need something installed, dunno)
e:\github\unquote\Unquote.Profile259\unknown(1,1): error FS0078: Unable to find the file 'System.Runtime.InteropService
s.dll' in any of C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile259
e:\github\unquote\Unquote.Profile259 C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETCore\3.259.3.1
[e:\github\unquote\Unquote.Profile259\Unquote.Profile259.fsproj]
so when fixing f# 3 conditionals (instead of f# 4), i didnt see the error.
i always tried locally with build.bat
(works for me, create the package).
@enricosada I'm not all up-to-date on .NET Core / Standard so excuse my ignorance, but according to Don's comment at https://github.com/fsprojects/FsProjectsAdmin/issues/10#issuecomment-237898162 , PCL 259 can be referenced from a .NET Core / Standard project... Unquote supports PCL 259 so I am wondering what the point of additionally supporting .NET Core / Standard is (may be totally misunderstanding everything)?
@stephen-swensen sry for late reply, i was in vacation :P
you can import the pcl, but there are some issue currently.
I got these errors trying to use imported unquote pcl from others dotnetcore project (Argu
for example).
I think there is an issue because unquote is referencing FSharp.Core
from gac (net40), not only pcl assemblies.
If create a console app, add the import of pcl, the app restore and build correctly, but at runtime:
Unhandled Exception: Swensen.Unquote.AssertionFailedException: Test failed:
([3; 2; 1; 0] |> List.map ((+) 1)) = [1 + 3..1 + 0]
System.TypeInitializationException: The type initializer for '<StartupCode$Unquote>.$Swensen.Unquote.DynamicOperators' threw an exception. ---> System.TypeLoadException: Could not load type 'System.Numerics.BigInteger' from assembly 'FSharp.Core, Version=4.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
at <StartupCode$Unquote>.$Swensen.Unquote.DynamicOperators..cctor()
--- End of inner exception stack trace ---
at Swensen.Unquote.Evaluation.eval(FSharpList`1 env, FSharpExpr expr)
at Swensen.Unquote.Reduction.reduce(FSharpList`1 env, FSharpExpr expr)
at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x)
at Swensen.Unquote.Reduction.reduce(FSharpList`1 env, FSharpExpr expr)
at Swensen.Unquote.Reduction.loop@126(FSharpList`1 env, FSharpExpr expr, FSharpList`1 acc)
Also imports doesnt work using dotnet sdk tools (the tools section) but i dont think that an issue for unquote, because is used in tests.
Last, netstandard1.6
it's another target profile, so additional assemblies who doesnt mess with other users of your library, but unlock the projects who are trying to convert the test suite to dotnetcore.
if you need i can gist you the code with imported pcl of unquote 3.1.2, if you think can be useful to fix that error
@enricosada yes that would be helpful. Wondering if we can just massage Unquote's PCL build so that it is sufficient for use by other projects without creating another profile.
in theory, pcl 259 is netstandard1.0
so should work, but..
anyway the example https://gist.github.com/enricosada/a639815605b32840fa3423235c9dfbe9
dotnet restore
dotnet run
i know is another profile, but the netstandard is the way forward for multitargeting, and improve the pcl (for example library author can choose the minimal api surface, fsharp.core should lower netstandard1.6 to 1.3 i think) so newer or different platform can be supported (pcl restrict the platform to a subset)
if you want to try a new pcl nuget package:
and
dotnet restore -f dir/to/new/pkg
dotnet run
Note that I have posted up another conversion to .NET Core at https://github.com/neoeinstein/unquote/tree/netcore. I also have published it as a package on my personal MyGet feed here: https://www.myget.org/F/neoeinstein/api/v3/index.json
Is there any update on this, now that .NET Core tooling is 1.0? Is there anything I could do to help and/or test?
@neoeinstein I tried to install Unquote from your personal feed, but the package isn't listed there... :(
@tlycken Hi - my update is this: i have been hesitant to consider .NET Core up until now because of the instability (e.g. JSON vs. MSBUILD project formats)... it looks like that is settling down and it is now on my radar for real. Not sure yet about time line, but I am thinking there will be a Unquote 4.0 release that targets .NET 45 and .NET Core (whatever) while deprecating PCL and .NET 40 builds...
Any thoughts welcome, it's difficult to keep a solid grasp of the prominent .NET build profiles from year-to-year...
(thanks, any nudge helps me, and I appreciate the offer for help!)
@stephen-swensen I feel you - I sort-of gave up on keeping track of the tooling when they announced they were ditching project.json
, and decided to wait for RTM. But that was released last week, so we can probably expect it to have stabilized now :)
There's a decent tutorial on microsoft.com that I found worked very well when following it exactly, but stumbled onto some subtleties when I tried to apply it to port a project of mine. I guess with some effort it shouldn't be a problem. Either way, I think that - and similar resources - is a good start for porting this library too.
Since this PR uses the preview2 version of the tooling, we'd probably have to re-do some of the work here. Perhaps @enricosada is better posed to know which changes here can be re-used?
@tlycken The version of unquote
that you need to use for my feed is 3.1.3-alpha-170218
.
@stephen-swensen @tlycken @neoeinstein i'll finish this, converting to fsproj.
@stephen-swensen now tooling is stable and rtm. Tooling was ok in preview2 too, source code changes will be the same, but now is expected to stay stable for quite a bit.
as a note, project.json (preview2) -> fsproj (1.0 rtm) tutorial is in the wiki https://github.com/dotnet/netcorecli-fsc/wiki/How-to-migrate-preview2-projects-to-1.0
Sry @neoeinstein didnt see your branch. I'll integrate your changes in my PR, i think here there is also tests and build script done.
Sorry another time @neoeinstein , seems i was a bit too optimistic about my free time for do this. I'll close, if someone want to continue branch continue to exists
Add .NET Core 1.0 RTM support (
netstandard1.6
) using .NET Core SDK preview2The build.bat now add netstandard to package,
if env varif .net core sdk is installed ( theUNQUOTE_NETCORE
is1
dotnet --info
return exit code 0) IMPORTANT changeversion
insideUnquote/project.json
before of the build, so is the same number as built processHow to try it:
First restore
After that
this will build
Unquote
, and runUnquoteTests
tests Same forVerifyNunit3Support
,VerifyXunit2Support
The
VerifyNonFrameworkSupport
is a console app, so instead