Ticket #20 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

Release web site should generate release assemblies

Reported by: louis.dejardin Assigned to: somebody
Priority: major Component: Spark Core
Keywords: Cc:

Description

Either that or there should be a debug/release switch provided to the factory. Right now each class is generated with debug symbols and a cs file on disk to provide the best debugging experience.

Change History

07/24/08 08:04:53 changed by marius

Maybe that switch could be read from <compilation debug="true|false"> section in web.config.

But then spark would be tied to asp.net (and might not be well suited to be used as custom file generator, see replacing NVelocity). Of course, code could check whether it is in web context, and should use web.config, or some custom parameter provider.

Another option is to introduce a custom configuration section, that would provide all required parameters to spark.

Possible solution (as far as I rememeber HttpContext.Current is null when outside asp.net context):

if (HttpContext.Current != null)
{
    CompilationSection configSection = (CompilationSection)WebConfigurationManager.GetSection("system.web/compilation");
    compilerParameters.IncludeDebugInformation = configSection.Debug;
}
else
{
    compilerParameters.IncludeDebugInformation = true;
}

07/25/08 18:29:11 changed by louis.dejardin

  • summary changed from Release build of spark should generate release assemblies to Release web site should generate release assemblies.

I believe there was a problem with use of the asp.net debug that the AspView? engine for MonoRail? already encountered... I believe it was iis6 and iis7 each have their own configuration section, so you'd also need to find out which one was in effect.

I also realized that the release build of spark is what most people will be using when they debug. So using that would make no sense at all!

I think I'm leaning towards having an optional custom configuration section.

08/04/08 04:04:25 changed by louis.dejardin

  • status changed from new to closed.
  • resolution set to fixed.
  • component changed from component1 to Spark Core.

Debug compile is off by default. It can be enabled with debug="true" in the spark config.

<configSections>
  <section name="spark" type="Spark.Configuration.SparkSectionHandler, Spark"/>
</configSections>
<spark>
  <compilation debug="true"/>
</spark>