FubuMvcArchive / bottles

OBSOLETE - Modular runtime packaging for .Net applications
http://fubuworld.com/bottles
Other
26 stars 16 forks source link

Improve the environment tests and make them a first class citizen in the PackageRegistry bootstrapping #61

Closed jeremydmiller closed 10 years ago

jeremydmiller commented 11 years ago

See https://groups.google.com/forum/?hl=en_US&fromgroups=#!topic/fubumvc-devel/c59ccw5Ablk

I think we mostly scrap the Bottles.Environment namespace and start over.

My notes:

EnvironmentActivator : IActivator ctor(IEnumerable) -- just runs all the IEnvironmentTest's against the IPackageLog passed in.

Might rig it up so that EnvironmentActivator runs as the first activator. Maybe force some kind of ordering in the IBootstrapper?

IEnvironmentTest

Description() : string Check(IPackageLog) -- we'd run this in a try/catch to capture the ex if the Check fails too

jeremydmiller commented 10 years ago

Right now I'm thinking that this happens by making another marker interface like:

IEnvironmentTest that just has Check(IPackageLog).

Options:

  1. Say that IEnvironmentTest needs to be put on IActivator's and Bottle bootstrapping will call them first.
  2. Change the signature of IBootstrapper so that it returns a Tuple of IEnvironmentTest's and IActivator's

Leaning toward option #1. Think it'd be easier to deal w/ making the container facility smarter.

Will want another option where you can bootstrap Bottles w/ only environment tests. If environment tests fail, you don't even try to run activators. The Bottles error has to show the environment tests first