RE: Advice on hosting ScriptCS in CShell

28 views
Skip to first unread message

Damian Schenkelman

unread,
May 23, 2014, 7:24:32 PM5/23/14
to Lukas Bühler, scri...@googlegroups.com
I'm answering from my phone so I won't include links, but modules are basically THE way of changing type mapping registrations for our IoC container.

Ideally we want to make a lot of things modular as it provides extensibility possibilities. If I recall correctly the current work to support Mono is being done through a module. I do not mean to imply that you need to support Mono, but some pretty cool stuff can be achieved with modules.

Hope that helps.

Sent from my Windows Phone

From: Lukas Bühler
Sent: ‎5/‎23/‎2014 20:00
To: scri...@googlegroups.com
Subject: Advice on hosting ScriptCS in CShell

Hi,

I'm working on hosting ScriptCS in CShell. The current status of my work on hosting ScriptCS is in this branch.

My dilemma is: should I host using ScripCs.Hosting, or should I write my own hosting layer? I did read this great answer on SO. And of course, by now, I've looked through most of the ScriptCS source. The reason why I'm considering to not using ScriptCs.Hosting is because it seems more designed for hosting it in a console application and also I'm wondering if I really have the need to support ScriptCS modules.
  • In CShell most basic services like IFileSystem, IConsole, ILog, IAssemblyResolver, and so on, will probably never be replaced. Some of those services actually have to be my implementation and if any other implementation is used CShell wont work.
  • Same with the scripting engine, I only want to support Roslyn and Mono, plus when either is selected some other services change and that will just be hard wired.
  • Some of the service implementations in ScriptCs.Hosting, while close to what I need, are too much with a focus on command line. A small example: the ScriptConsoleLogger does not allow to change the log level after it is instantiated.
  • The only place where I can think of where I want extensibility is in the ILineProcessors and in the (future) IReplCommands.
  • Currently I use vanilla MEF IoC with some helpers from Caliburn.Micro. I wonder if this will play nice with the Autofac IoC from ScriptCs.Hosting?
  • For now I just copied the NuGet IInstallationProvider
Here's my embarrassing hand rolled ScriptServicesBuilder, of course this will need a proper integration into my IoC solution if I dont use ScriptCs.Hosting.

But I don't fully understand the benefits of modules and wonder if I will seriously cripple my ScriptCS support if I don't really support them...?

Any input on what path I should choose is appreciated!

-luke
Reply all
Reply to author
Forward
0 new messages