dotnet new
mkdir compiler
mkdir compiler/preprocess
echo "bang" > compiler/preprocess/test.cs
dotnet restore && dotnet build
The build should blow up, or warn that preprocessing is not supported, not just silently ignore stuff. What is the roadmap for preprocessing? There seems to be a distinct lack of information around this.
Build is successful, prepreocess sources are ignore, there are no warnings or errors.
dotnet --version
output:
.NET Command Line Tools (1.0.0-beta-001598)
Product Information:
Version: 1.0.0-beta-001598
Commit Sha: N/A
Runtime Environment:
OS Name: ubuntu
OS Version: 14.04
OS Platform: Linux
Runtime Id: ubuntu.14.04-x64
@m0sa what are preprocess files? it's a dnx feature? i cant find docs about that
@enricosada yep, check out https://github.com/aspnet/dnx/issues/39 for a full description.
Relevant sources in dotnet CLI master:
... and in DNX master:
thx @mausch
Yea this feature is dead and isn't coming back unfortunately.
@davidfowl this is big news to me. How is view precompilation going to work?
Please consider bringing this back. This and xplat are by far the most exciting features I'm looking forward to. ICompileModule
has massive potential for reducing boilerplate in everyday C# code. I've even started a project around it basically implementing the equivalent of Java's annotation processors (which has been a feature of Java since 2006!).
And the cool thing is, it's already implemented. You only have to copy the code from DNX, so why not?
The c# team are looking at implementing something similar called generators tho I'm sure what phase it's at.
/cc @jaredpar
Yea this feature is dead and isn't coming back unfortunately.
No, really?! :cry: That's just a game-changer for the thing we're building, and we've build quite a lot on it since the launch of DNX.
So is there like any way right now to hook into the compilation process? Even if it's more low-level than than ICompileModule
(including hooking into native bootstrapping)?
@per-samuelsson https://github.com/dotnet/roslyn/issues/5561 seems to be the official discussion about the feature replacing this one
dotnet/roslyn#5561 seems to be the official discussion about the feature replacing this one
Thanks @m0sa. By chance I found that issue some hour ago and started reading uo on it (and linked issues) to see if I could grasp it, and see if it fit our needs. It's still some things to digest there for me. I hope it turns out well.
You pointing me in that direction, and when I saw you just posted there days ago, is helpful indeed, because then I know I'm likely reading at the right place. :smile:
The Roslyn source generator feature work is actually well under way. The progress can be followed on this branch:
Live design document of the implementation:
https://github.com/dotnet/roslyn/blob/features/generators/docs/features/generators.md
@jaredpar
Thanks. Those were new to me, and very valuable. Any kind of resources you have on this would be very welcome, as it's quite different from the thing we've implemented on top of DNX/ICompileModule
, and we kind of need to reconsider our whole design from scratch.
Given the above communication, I'm clsoing this issue.