Closed PegasusMKD closed 4 years ago
On the first part, what version of the C# compiler are you using? The errors you're seeing in UnmanagedResourceHelper
makes it appear that it doesn't support expression-bodied properties, which were added in C# 6.0.
For the second part, having that error come up is quite annoying. I don't see that when I run it locally; is there any way you can reproduce it under the debugger? Without a stack trace, it's very difficult to guess what's going wrong. I've seen it a few times and it usually means something screwy is going on with generics, but that's just a wild guess.
It seems, from what I can tell, that the problem is with NAnt, it's taking the Windows built-in .NET Framework 4.5 which doesn't use C# 6.0. I will try to tweak it bit by bit, so as to make it work with what I got with NAnt.
If there is anyway to set the path differently, and set all of the packages it might need from the .NET 4.6 through 4.8 (i tried working on some of the Nant.exe.config, but there were some variables that i don't know where they came from) do tell me.
Sorry for the late reply btw!
Have a look at https://stackoverflow.com/questions/15116265/how-to-specify-msbuild-version-in-nant-script and see if any of the answers offered there are helpful.
Looks like i missed the mark with the C# Versioning, i changed the small pieces that were with C# 6.0 to be compatible with the one i have, it works (it shows a couple of errors, but they also showed when i ran the file with the csc of the .NET Framework 4.6 which u can see in the booc log that was originally attached under the Boo.Lang.Compiler)
Now the only problem left is with the booc, already tried:
I am lost as to what to do next. The problem seems to be in the Compiler Translating something in the Boo code from Boo.NAnt.Tasks from my understanding, not really sure what the problem is though. I plan on spinning up a Linux VM in Hyper-V and see how the installation behaves there.
I am lost as to what to do next.
At this point, what I'd do is modify your local copy of CompilerErrorFactory.StepExecutionError
to include the stack trace of the exception in the reported error. Then you'd have some more context about what's going wrong inside the compiler.
Managed to fix it thanks to the full stack trace, it built successfully! The problem seemed to be that i changed UnManagedResources so that it would be compatible with the C# that Windows is using, with which in turn I've set some Assembly parameters to null (VersionResource if i'm correct). I just set all of those to " ", and it compiled without errors.
Now I'm running into an issue with the powershell script for the nunit, but I'll try a simple hello world and see if it works. Will post an update.
Happy to hear it's making progress for you!
It seems to be working. Thanks a lot! Couldn't have done it without you. One final question, are there any libraries/frameworks/IDEs made specifically for Boo, and if so, are there any backend ones since I'm a backend dev.
Will close the issue after the answer :)
If backend web dev is your thing, have a look at Web.Boo, a server framework I've been working on for the last few years that uses metaprogramming to set up routing and make it quick, simple, and Reflection-free. It's still very much a work in progress, but it works well.
As an addendum, I was suffering from the first error, but I recently discovered a way to fix it without modifying any of Boo's source itself. in /build-tools/tools/nant/NAnt.exe.config, I replaced the sdkdirectory
and frameworkdirectory
attributes of <framework name="net-4,5" ... >
(line ~900). Changing them from ${path::combine(installRoot, 'v4.0.30319')}
to C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn
seems to convince NAnt to use the updated compiler that you can get with Visual Studio (note: this requires Visual Studio and the Visual C# stuff to be installed).
I didn't change frameworkassembydirectory
as it complained it could not find System.dll. I left it as is ${path::combine(installRoot, 'v4.0.30319')}
. It may cause booc to break, but booi and booish work fine (as far as I can tell). The CI script passed without failures. I probably just need to find the right directory...
I would really love to start using Boo and try to contribute to the community, but, it seems that the build process has some issues. I'll divide this into 2 parts, the Compiler and the booc.
Compiler
When I first started the nant script, the output was:
So I fumbled around with the code in UnmanagedResourceHelper.cs, which helped it pass to the next sections of the builder (although it still showed some errors).
booc
When it went through to the next sections after the changes made in the UnmanagedResourceHelper.cs file, I received this error which i can't really change taking into consideration that it says that the problem is inside the .exe (or atleast I didn't catch where it breaks). The log is:
I would really appreciate the help since I really love both Python and C#, and I would really like to try implementing Boo where I can, or maybe create some OSS for it.