Giter Site home page Giter Site logo

Comments (7)

adamralph avatar adamralph commented on September 21, 2024 1

The Roslyn team have already shown interest in building this into the Roslyn scripting libraries. Whatever happens here should be in line with what happens there to avoid fragmentation. I.e. scripts that run with runner A but not runner B. For that reason I would raise this again with Roslyn before doing anything here. E.g. dotnet/roslyn#6900

from dotnet-script.

filipw avatar filipw commented on September 21, 2024

I am not entirely sure that project.json is the best way to specify dependencies since Microsoft is moving away from it.

something it's going to stay there for Nuget (whether it's nuget.json or whatever it's called, we'll see 😄

Regarding the other stuff, I tend to agree with Adam, yes.

That said, I still see some room for runner customization out there, especially as we work toward solving very specific problems. For example writing ASP.NET apps contains a lot of extra ceremony so I could imagine dotnet script aspnet foo.csx which would wire in a custom host that exposes ConfigureServices and such methods (see here). It has to be an opt in though (part of the Roslyn's scripting big selling points is Bring Your Own Globals, after all).

from dotnet-script.

adamralph avatar adamralph commented on September 21, 2024

The bring your own globals is indeed very powerful and I believe it's best used when hosting scripts in apps, where the scripts are specifically written for use in those apps. E.g. similarly to how VBA used to be used for app automation back in the day (and as the back bone of many large companies today 😰), where each app injects its context specific objects in, such as an Excel workbook, or Word document.

One temptation is to put boiler plate into globals but once we get better nuget support for scripting, it will be much easier to pull in those things via a nuget package. Of course, that won't work when the runner itself has to inject some context. For that case, perhaps there is an argument for some infra-level specific globals, e.g. an "ASP.NET flavour script" such as the one you linked to. For a generic runner, I'd like to see as much portability as possible.

from dotnet-script.

seesharper avatar seesharper commented on September 21, 2024

I was just wondering how you guys plan to move this forward. project.json is practically a goner starting with the preview 3 SDK. Roslyn Scripting is approaching 2.0, but I don't know if they have put in support for NuGet packages in load directives yet?

from dotnet-script.

adamralph avatar adamralph commented on September 21, 2024

IMHO the first thing to do is to check on the status of this within Roslyn scripting.

from dotnet-script.

filipw avatar filipw commented on September 21, 2024

Roslyn Scripting is approaching 2.0, but I don't know if they have put in support for NuGet packages in load directives yet?

no

I was just wondering how you guys plan to move this forward. project.json is practically a goner starting with the preview 3 SDK

the scripting here will change up to use csproj instead

from dotnet-script.

filipw avatar filipw commented on September 21, 2024

Fixed by #84

from dotnet-script.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.