* BuildManager.cs: do less work in the static constructor
2010-03-04 Marek Habersack <[email protected]>
* RuntimeHelpers.cs: added. Contains methods moved here from
HttpRuntime, so that initialization sequence of various objects is
independent of HttpRuntime.
2010-03-04 Marek Habersack <[email protected]>
* HttpRuntime.cs: do less work in the static constructor. Most of
the code was moved to System.Web.Util.RuntimeHelpers. Properties
which have been moved: MonoVersion, RunningOnWindows,
CaseInsensitive, IsDebuggingEnabled
Also:
- hushed some compiler warnings
- various classes now use RuntimeHelpers instead of HttpRuntime
svn path=/trunk/mcs/; revision=153038
* HttpRuntime.cs: added internal property DomainUnloading.
* HttpApplication.cs: when app domain is unloading, catch
ThreadAbortExceptions and reset the abort.
2010-02-27 Marek Habersack <[email protected]>
* BuildManager.cs: count only builds of updated files before
unloading the app domain. Fixes bug #581459
svn path=/trunk/mcs/; revision=152600
* PreservationFile.cs: updated the BuildResulTypeCode enum
* BuildManager.cs: LoadCompiled now adds all the assemblies built
from the App_Code directory to the BuildManager.CodeAssemblies
collection. Fixes bug #576810
svn path=/trunk/mcs/; revision=150802
* BuildManager.cs: in GenerateAssembly, if compilation fails for
the requested path and exception thrown is of type
CompilationException, do not wrap it in HttpException, just
rethrow.
* AppResourcesCompiler.cs: the culture files dictionary is
case-insensitive now. Otherwise culture files with culture name
cased differently will cause overlapped i/o on response files
while building satellite assemblies and, in effect, compilation
will fail.
svn path=/trunk/mcs/; revision=149077
* BuildManager.cs: make sure to construct correct physical path
for every precompiled key in FixVirtualPaths. Fixes bug #546053
svn path=/trunk/mcs/; revision=143950
* BuildManager.cs: added IsPrecompiled internal property.
* AppResourcesCompiler.cs: load precompiled site local and global
resource assemblies from static constructor. Fixes bugs #536138
and #536143
svn path=/trunk/mcs/; revision=141474
* BuildManager.cs: when HttpRequest.FilePath is '/' in
GetAbsoluteVirtualPath, don't try to use
VirtualPathUtility.GetDirectory on it. Fixes bug #532679
svn path=/trunk/mcs/; revision=140786
* PageParser.cs: 2.0 profile takes advantage of the inputFile
parameter to GetCompiledPageInstance. A check is made whether the
file pointed to by this parameter is inside the application's
virtual path and if not, the compilation request is assumed to
refer to a fake location. Part of fix for bug #463813
2009-08-24 Marek Habersack <[email protected]>
* PageBuildProvider.cs: MapPath now takes a VirtualPath
instance. Part of fix for bug #463813
* BuildManager.cs: public APIs which take virtual path strings as
their parameters got internal counterparts accepting a VirtualPath
instance in place of string. Part of fix for bug #463813
* GenericBuildProvider.cs:
MapPath now takes a VirtualPath instance. Part of fix for bug
#463813
2009-08-24 Marek Habersack <[email protected]>
* SoapDocumentationHandler.cs: get rid of the ugly fake virtual
path hack when creating the helper page. Part of fix for bug
#463813
2009-08-24 Marek Habersack <[email protected]>
* VirtualPath.cs: Added new constructor which takes virtual and
physical paths as well as a boolean marking the instance as
referring to a fake location. Part of fix for bug #463813
svn path=/trunk/mcs/; revision=140548
* BuildManager.cs: precompilation setup failed if the precompiled
virtual directory was / and it was deployed somewhere else.
svn path=/trunk/mcs/; revision=138576
* BuildManager.cs: GetReferencedAssemblies unconditionally
includes all assemblies from bin/ for precompiled sites. Fixes bug
#502016
svn path=/trunk/mcs/; revision=138246
* BuildManager.cs: allow deployment of precompiled applications under
any virtual path, not just the default one used when precompiling.
Fixes bug #483268.
svn path=/trunk/mcs/; revision=135231
* HttpException.cs: if custom errors are enabled and the error
code is 404 show the "standard" 404 error message instead of the
default custom error mode one. Fixes bug #508649
2009-06-01 Marek Habersack <[email protected]>
* BuildManager.cs: when throwing a 404 exception, pass the virtual
path to the exception constructor.
svn path=/trunk/mcs/; revision=135147
* BuildManager.cs: RemoveFailedAssemblies wraps the compilation
exception to be rethrown in a HttpException instance.
* AspGenerator.cs: create a Location and pass it to the parser
before calling AddDirective from GetInheritedType, so that we get
meaningful exception messages with source, line information etc.
svn path=/trunk/mcs/; revision=133568
* BuildManager.cs: when BuildInner catches a compilation
exception, wrap it in HttpException before re-throwing.
2009-04-30 Marek Habersack <[email protected]>
* TemplateParser.cs: removed the PageParserFilterTypeName
property, the filter type name is looked up on demand now.
* ApplicationFileParser.cs, MasterPageParser.cs,
UserControlParser.cs: load config defaults explicitly after
initializing the instance.
svn path=/trunk/mcs/; revision=133169
* TemplateParser.cs: use generic lists for import, namespace and
interface caches. If a namespace is added (e.g. by parsing the
Import directive), find the assembly in which namespace is
defined.
2009-04-15 Marek Habersack <[email protected]>
* BuildManager.cs: do not add all assemblies in bin/ when serving
a precompiled site. Fixes bug #493873
When serving a precompiled site, check if the bin/ directory
contains certain well-known assemblies and load them if present.
svn path=/trunk/mcs/; revision=131768
* CompilationException.cs: skip warnings in ErrorMessage and
ErrorLines
* BuildManager.cs: when an error occurs while compiling the
requested virtual path, throw the exception, do not attempt to
build again.
* TemplateControlCompiler.cs: implemented missing converter for
the ExpandDepth property. Fixes bug #490860
2009-04-02 Marek Habersack <[email protected]>
* HttpException.cs: if there are more lines with errors, display
them all.
svn path=/trunk/mcs/; revision=130876
* All of the below are part of the fix for bug #489687
* ThemeDirectoryCompiler.cs: pass VirtualPath instances to parser
constructors.
* BuildProvider.cs: associated virtual path is stored internally
as an instance of VirtualPath, accessible via new
VirtualPathInternal property.
* BuildManagerDirectoryBuilder.cs: VirtualPath.IsFake is used to
detect fake virtual paths.
GetBuildProvider now takes a VirtualPath instead of string for the
virtualPath parameter. The passed VirtualPath instance is passed
unchanged to BuildProvider.
* BuildManager.cs: AssertVirtualPathExists now uses
VirtualPath.IsFake to check for fake virtual paths.
* ApplicationFileBuildProvider.cs, GenericBuildProvider.cs,
MasterPageBuildProvider.cs, PageBuildProvider.cs,
ThemeBuildProvider.cs, UserControlBuildProvider.cs,
WebHandlerBuildProvider.cs, WebServiceBuildProvider.cs:
CreateParser overloads now take a VirtualPath instead of a string
for the virtualPath parameter.
* ThemeBuildProvider.cs: use new parser constructors which take
VirtualPath instances instead of strings.
2009-03-31 Marek Habersack <[email protected]>
* VirtualPath.cs: added code to detect whether the VirtualPath
instance represents a fake virtual path (IsFake property).
Added new property DirectoryNoNormalize which returns
non-normalized directory for the VirtualPath instance.
Made ToString () a bit more friendly and well-behaved.
2009-03-31 Marek Habersack <[email protected]>
* ApplicationFileParser.cs, MasterPageParser.cs, PageParser.cs,
PageThemeFileParser.cs, PageThemeParser.cs, UserControlParser.cs,
WebHandlerParser.cs, WebServiceParser.cs: 2.0 constructors take a
VirtualPath instance for the virtualPath parameter, instead of a
string.
svn path=/trunk/mcs/; revision=130665
* BuildManager.cs, BuildManagerDirectoryBuilder.cs,
BuildProvider.cs, TemplateBuildProvider.cs: dependencies are
returned as an IDictionary <string, bool>. Dependencies must be
compared case-insensitively.
svn path=/trunk/mcs/; revision=129142
* System.Web/HttpWriter.cs: new Response property and WriteUTF8Ptr
method.
* System.Web/HttpResponseStream.cs: added support for writing from an
IntPtr. copied the memcpy method from String.cs.
* System.Web.Compilation/BuildManager.cs: updated comment.
* System.Web.UI/ResourceBasedLiteralControl.cs: new Control. It's just
like a LiteralControl but will render itself from the bytes pointed to
by an IntPtr and not create any string from the underlying data unless
needed.
* System.Web.UI/TemplateControl.cs: implemented a bunch of methods
that are used from the precompiled assemblies for a web project. The
most notable change needed is to be able to read a win32 resource from
the dll of the control. The resource is a concatenation of literals
with plain text for the control and a specialized LiteralControl is
generated from different chunks of the resource.
* System.Web.UI/HtmlTextWriter.cs: new method that returns the
HttpWriter in use.
* System.Web.dll.sources: added new file.
* System.Web.Util/ICalls.cs: new internal call to get a pointer to the
win32 resource associated with the control's assembly.
svn path=/trunk/mcs/; revision=127579
* System.Web/HttpApplicationFactory.cs: check of global.asax was precompiled.
* System.Web.UI/MasterPage.cs: the items in ContentPlaceHolders are lowercase.
* System.Web.Compilation/TemplateControlCompiler.cs: lowercase place holder names
* System.Web.Compilation/BuildManager.cs: initial support for
precompilation. No 'updatable', please.
svn path=/trunk/mcs/; revision=127352
* Makefile (SYSTEMCORE_DEP):
If NO_SYSTEMCORE_DEP is defined System.Web.dll will not be linked
with System.Core.dll and BuildManager will use ReaderWriterLock
instead of ReaderWriterLockSlim.
2009-01-22 Marek Habersack <[email protected]>
* BuildManager.cs:
- if SYSTEMCOR_DEP is undefined use ReaderWriterLock instead of
ReaderWriterLockSlim
svn path=/trunk/mcs/; revision=124253
* Makefile (net_2_0_dirs): added System.Web - it now depends on
System.Core, so it needs to be recompiled one more time after
System.Core is done.
2009-01-22 Marek Habersack <[email protected]>
* System.Web.dll.sources: added
System.Web.Compilation/BuildManagerCacheItem.cs,
System.Web.Compilation/BuildManagerDirectoryBuilder.cs,
System.Web.Compilation/BuildProviderGroup.cs
* Makefile (SYSTEMCORE_DEP): added. Defines SYSTEMCORE_DEP on the
mcs command line when System.Core is present.
Added the DEVEL define, which defines DEVEL on the mcs command
line. This is used to conditionally compile development helper code in
System.Web.Util.FileUtils (and possibly other stuff later on)
2009-01-22 Marek Habersack <[email protected]>
* XsdBuildProvider.cs: added missing BuildProviderAppliesTo
attribute.
* BuildProvider.cs: added new internal virtual method,
ExtractDependencies() whose purpose is to extract virtual path
dependencies without compiling the code, if possible.
* TemplateBuildProvider.cs: implemented the new
ExtractDependencies () method which uses regular expressions to
extract file dependencies from the source without having to
compile the file.
* CompilationException.cs: added a new public property, Results,
which returns the compilation results.
* BuildProviderGroup.cs: added. A simple class descending from
List <BuildProvider> which is used to hold a compilation batch -
that is a collection of BuildProvider instances.
* BuildManagerDirectoryBuilder.cs: new class which takes care of
generating compilation batches for the requested virtual path. A
set of batches is generated from files found in the same virtual
directory as the requested virtual path and all of the
dependencies of those files. All files are grouped in batches
within which no file depends upon its siblings. An attempt is made
to sort the batches from the "least dependent" to the "most
dependent" batches - i.e. the batches which do not depend on other
batches go to the top.
Code generating the batches now correctly detects dependency loops
and throws an exception when one is encountered.
Batches are represented as instances of a new class -
BuildProviderGroup.
* BuildManagerCacheItem.cs: added. Contains all the compilation
result information needed by BuildManager. See below.
* BuildManager.cs: complete batch building rewrite:
- only one build lock is held instead of a set of compilation
tickets. Only one thread can compile anything at one given
time.
- retrieving types from the build cache now uses a slim rw lock,
so that readers aren't blocked while compilation is in
progress. Writer lock is acquired only when adding a newly
compiled type to the build cache and when removing it after its
dependencies made it invalid.
- assembly references for each compilation are now collected
dynamically as the source is being compiled, this removed a lot
of complexity in dealing with assembles containing conflicting
types. As a consequence right now there may exist several
loaded assemblies containing the same type, but only the latest
of them will be used in new compiles.
- the thread compiling code can recurse into the Build method
which causes the recursively referenced code to be compiled
into a separate, uniquely named, assembly. This deals with all
recursion loops and dependency problems.
- automatic app domain restart after a certain number of compiles
is enabled now.
- improved compilation error handling. If a compilation error
occurs, the code attempts to recompile the assembly up to 3
times, each time removing from the batch the files/virtual
paths which failed parsing/compilation. If the attempts failed,
another one is made to compile only the virtual path requested
by the calling code. Only should that fail a compilation
exception is thrown. All the compilation errors are written to
stdout if the application is in the debug mode.
- changed assembly naming. It now generates assembly names based
on whether the compilation is recursive and whether the batch
being compiled contains more than one code unit or
not.
- compilation results are now stored in the cache as instances of
the new BuildManagerCacheItem class, which contains all the
information required by BuildManager to return types,
assemblies, dependencies etc.
- GetReferencedAssemblies now correctly returns only the
assemblies defined in the .config files.
- GetVirtualPathDependencies does not need to compile code
anymore in order to extract virtual path dependencies. New code
in BuildProvider.ExtractDependencies () takes care of that.
- a BuildManagerDirectoryBuilder class instance is used to
generate compilation batches.
* AssemblyBuilder.cs: added support for keeping track of which
code unit was generated by which BuildProvider andr which
BuildProvider produced a given source file. Both changes serve the
purpose of dealing with compilation errors in BuildManager.
* ApplicationFileBuildProvider.cs: added missing
BuildProviderAppliesTo attribute
2009-01-22 Marek Habersack <[email protected]>
* FileUtils.cs: added two conditionally compiled methods (they
require DEVEL to be defined) which output lines to a log file.
2009-01-22 Marek Habersack <[email protected]>
* WebTest.cs: Run () sets the internal field
BuildManager.suppressDebugModeMessages to true.
2009-01-22 Marek Habersack <[email protected]>
* Web.mono.config: added numRecompilesBeforeAppRestart attribute
to the compilation element, set to 100000, to avoid appdomain
restarts during tests.
svn path=/trunk/mcs/; revision=124179
* BuildManager.cs: attempt to enter the compilation critical
section with a timeout up to 3 times before giving up. This avoids
deadlocks in situations where there are two virtual directores
each containing user controls referencing user controls from the
other directory.
svn path=/trunk/mcs/; revision=120861
* MonoSettingsSection.cs: added - a section for mono-specific
settings.
2008-10-09 Marek Habersack <[email protected]>
* BuildManager.cs: if monoSettings section is found in the
system.web section in web.config, use its contents to augment
compiler configuration. Used to work around the issue reported in
bug #433806
2008-10-09 Marek Habersack <[email protected]>
* System.Web.dll.sources: added System.Web.Configuration_2.0/MonoSettingsSection.cs
svn path=/trunk/mcs/; revision=115337
* TemplateParser.cs: make sure the generated class name is a valid
language independent identifier. Fixes bug #431622
2008-10-03 Marek Habersack <[email protected]>
* BuildManager.cs: if an assembly fails to build out of a batch of
files, extract the virtual path that was requested by the client
and attempt to compile it alone.
svn path=/trunk/mcs/; revision=114732
* OutputCacheModule.cs: invalidate cache entries when the
corresponding source file (.as?x) is recompiled by hooking up to
System.Web.Compilation.BuildManager's build cache entry removal
event. Fixes bug #429926
2008-09-29 Marek Habersack <[email protected]>
* BuildManagerRemoveEntryEventHandler.cs: added
* BuildManager.cs: added a static event to notify interested
parties when an entry is removed from the buildCache. Fixes bug
#429926.
svn path=/trunk/mcs/; revision=114369
* BuildManager.cs: when creating a cache entry for a virtual path,
make it depend on a list of files built recursively from all the
virtual path's dependencies. Fixes bug #430114
svn path=/trunk/mcs/; revision=114205
* BuildManager.cs: if an error occurs while assigning the
requested path to an assembly builder inside BuildAssembly, throw
an exception.
svn path=/trunk/mcs/; revision=105637
* SimpleWebHandlerParser.cs: refactoring - move code between
constructors, reader should be set before initializing the rest of
the object. Fixes bug #381364
* TemplateParser.cs: RegisterCustomControl must use absolute
virtual path when querying the virtual path provider for
file. Fixes bug #381364
2008-04-19 Marek Habersack <[email protected]>
* BuildManager.cs: use absolute virtual path to query the
VirtualPathProvider for path existence.
When ASP.NET is self-hosted, force
non-batch compilation. Fixes bug #380985
* ILocation.cs: added a new property, FileText.
* Location.cs: added implementation of the ILocation.FileText
property.
* ParseException.cs: use the new ILocation.FileText, if defined,
to get the file source.
* AspGenerator.cs: when TextReader is present, use it to read with
the VirtualPathProvider to read the file source. Fixes bug #381364
* AspParser.cs: added a new property FileText to provide the file
contents which was read in the constructor.
svn path=/trunk/mcs/; revision=101177
* BuildManager.cs: when any parsing error occurs during batch
building, ignore the file which caused it. If the file with
parsing error is the one requested by user, throw the parsing
exception. Fixes bug #323742
svn path=/trunk/mcs/; revision=101115