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

CoreCLR: avoid project.json for simple cases #351

Closed
tjanczuk opened this issue Nov 19, 2015 · 3 comments
Closed

CoreCLR: avoid project.json for simple cases #351

tjanczuk opened this issue Nov 19, 2015 · 3 comments

Comments

@tjanczuk
Copy link
Owner

@lstratman The CoreCLR requirement for project.json even for the simplest of scenarios is in rather stark contrast to the experience Node users are used to. Is there a reasonable way of avoiding this requirement? Can the project.json be specified imperatively via an API, perhaps one that covers at least the built-in dependencies: https://github.com/tjanczuk/edge-cs/blob/master/src/edge-cs-coreclr/EdgeCompiler.cs#L67-L74?

@lstratman
Copy link
Contributor

That should be possible, yes. We actually already add a loader for the compiler's project.json (https://github.com/tjanczuk/edge/blob/master/src/CoreCLREmbedding/coreclrembedding.cs#L259-L268), but without a project.json for the application itself, it throws an exception before it can reach that point. We can distribute the project.json for Edge.js itself (https://github.com/tjanczuk/edge/blob/master/src/CoreCLREmbedding/project.json), run dnu restore on it during install like we do when we're in Linux, and then, in the EdgeAssemblyLoadContext constructor when we detect that there's no project.lock.json, we can add a loader for the "stock" project.lock.json that should allow them to run just about anything that doesn't require any external libraries. I'll experiment with this a bit tomorrow.

@tjanczuk
Copy link
Owner Author

Perfect, that would be a much better user experience!

@cmatskas
Copy link

Great question and an even better answer. I look forward seeing this implemented

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

No branches or pull requests

3 participants