2009-02-28 Gonzalo Paniagua Javier <gonzalo@novell.com>
[mono.git] / mcs / class / System.Web / System.Web.Compilation / ChangeLog
index c6d28257056f11e956fbd4aa98d1ee1f7d2b9b94..f500ec3b5eddf7dbafd27b50eb5dd5c56e831817 100644 (file)
@@ -1,3 +1,412 @@
+2009-02-28 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * AppResourcesAssemblyBuilder.cs:
+       * BuildManagerDirectoryBuilder.cs:
+       * AspComponentFoundry.cs:
+       * AssemblyBuilder.cs:
+       * CachingCompiler.cs:
+       * AspGenerator.cs:
+       * WsdlBuildProvider.cs:
+       * BaseCompiler.cs:
+       * BuildProvider.cs:
+       * AppWebReferencesCompiler.cs:
+       * TemplateControlCompiler.cs:
+       * BuildManager.cs:
+       * AppCodeCompiler.cs: settings that have to be in
+       machine.config or the root level web.config now call
+       GetWebApplicationSection.
+
+2009-02-26  Marek Habersack  <mhabersack@novell.com>
+
+       * TagAttributes.cs: modified ToString to return string formatted
+       in a more helpful way.
+
+       * AspParser.cs: added ToString, helpful when debugging.
+
+       * AspGenerator.cs: properly print leading and trailing plain text
+       when looking for embedded tags in ProcessTagsInAttributes.
+
+2009-02-25  Marek Habersack  <mhabersack@novell.com>
+
+       * AspTokenizer.cs: put_back now uses a stack and allows more than
+       one invocation when called inside a tag.
+
+       * AspGenerator.cs: when a nested parser is used, pay attention to
+       server tags found inside client tags and add them to the control
+       tree.
+
+2009-02-24  Marek Habersack  <mhabersack@novell.com>
+
+       * BuildManager.cs: Path.Combine must not be passed null first
+       parameter.
+
+2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * System.Web.Compilation/BuildManager.cs: updated comment.
+
+2009-02-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * TemplateControlCompiler.cs: lowercase place holder names
+       * BuildManager.cs: initial support for precompiled sites.
+
+2009-02-13  Marek Habersack  <mhabersack@novell.com>
+
+       * AspParser.cs: added an event raised when parsing is complete.
+
+       * AspGenerator.cs: added support for PageParserFilter which, if
+       found, is used to control certain aspects of code parsing
+       (accepting/rejecting control types, accepting/rejecting code
+       snippets, parsing completion)
+       Added the AddControl method, used by PageParserFilter when a
+       custom filter wants to inject a control in the current control
+       builder tree.
+
+2009-02-05  Marek Habersack  <mhabersack@novell.com>
+
+       * AppResourcesCompiler.cs: implemented a type resolver for
+       ResXResourceReader so that it can correctly resolve
+       System.Resources types which are normally found in
+       System.Windows.Forms but are included by System.Web
+       directly. Without the type resolver, code comparing types inside
+       ResXResourceReader when file references are used in side the .resx
+       file will not work correctly. The reason for that is that .resx
+       files will name "System.Resources.ResXFileRef,
+       System.Windows.Forms" as the file reference handler, while inside
+       System.Web ResXFileRef will be of type
+       "System.Resources.ResXFileRef, System.Web". Fixes bug #466059
+
+       * GenericBuildProvider.cs: added a new virtual method, MapPath,
+       which can be overriden by builders which need special handling of
+       virtual path mapping.
+
+       * PageBuildProvider.cs: provide implementation of
+       GenericBuildProvider.MapPath which takes into account fake virtual
+       paths. Fixes bug #463950
+
+2009-01-26  Marek Habersack  <mhabersack@novell.com>
+
+       * BuildManagerDirectoryBuilder.cs: added support for fake virtual
+       paths.
+
+       * CompilationException.cs: added a Message override to make error
+       messages more useful.
+
+2009-01-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * AspComponentFoundry.cs: no need to throw. Caller handles a null
+       return value.
+
+2009-01-23  Marek Habersack  <mhabersack@novell.com>
+
+       * BuildManager.cs: use -1 for infinite wait in calls to
+       Acquire{Reader,Writer}Lock ().
+
+2009-01-22  Marek Habersack  <mhabersack@novell.com>
+
+       * 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.
+        - if SYSTEMCOR_DEP is undefined use ReaderWriterLock instead of
+        ReaderWriterLockSlim
+
+       * 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-14  Marek Habersack  <mhabersack@novell.com>
+
+       * AspGenerator.cs: implemented a work around which allows the
+       server controls embedded in client tag attributes to be parsed and
+       compiled.
+
+2009-01-13  Marek Habersack  <mhabersack@novell.com>
+
+       * TemplateControlCompiler.cs, AspGenerator.cs, BaseCompiler.cs,
+       GlobalAsaxCompiler.cs, PageThemeCompiler.cs: updates related to
+       ControlBuilder cleanup.
+
+2009-01-12  Marek Habersack  <mhabersack@novell.com>
+
+       * TemplateControlCompiler.cs: do not generate #line pragmas for
+       plain strings. Fixes bug #461214
+
+2008-12-11  Marek Habersack  <mhabersack@novell.com>
+
+       * BaseCompiler.cs: added a new method, InitializeType, to be
+       overriden in child classes when any class initialization needs to
+       be performed before methods, constructors and fields are created.
+
+       * TemplateControlCompiler.cs: if the parser has any custom
+       controls registered, compile them here - in the InitializeType
+       method.
+
+2008-12-10  Marek Habersack  <mhabersack@novell.com>
+
+       * ParseException.cs: made serializable.
+
+       * PageCompiler.cs: CreateStronglyTypedProperty calls
+       AddReferencedAssembly to add type's assembly to the unit's
+       references after the typed property has been created.
+
+       * BaseCompiler.cs: added a new helper method,
+       AddReferencedAssembly to be used whenever an assembly location
+       needs to be added to the compilation unit's list after the parsing
+       is done (e.g. when processing PreviousPageType or MasterPageType
+       properties in PageParser)
+
+2008-12-08  Marek Habersack  <mhabersack@novell.com>
+
+       * TemplateControlCompiler.cs: use the correct regex match group
+       index in SanitizeBindCall (), fixes bug #457011
+
+2008-12-05  Marek Habersack  <mhabersack@novell.com>
+
+       * 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.
+
+2008-12-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * AspParser.cs: reset to the next character in a partial match in case
+       of failure. Fixes bug #314688.
+
+2008-12-01  Marek Habersack  <mhabersack@novell.com>
+
+       * TemplateControlCompiler.cs: instead of adding ContentPlaceHolder
+       instances to the ContentPlaceHolders collection when the
+       placeholder is instantiated in the control build method, collect
+       the ids and store them in ContentPlaceHolders inside the
+       constructor. Fixes bug #449970
+       For each content placeholder generate a public virtual property
+       named "Template_PLACEHOLDERID", this is compatible with what .NET
+       does.
+
+       * BaseCompiler.cs: added new virtual method,
+       AddStatementsToConstructor, which is called just before
+       CreateConstructor returns.
+
+2008-11-25  Marek Habersack  <mhabersack@novell.com>
+
+       * AspComponentFoundry.cs: GetComponentType methods replaced with
+       GetComponent returning an instance of AspComponent which fully
+       describes the registered item. Components are cached, indexed by
+       full tag name.
+
+       * AspComponent.cs: added
+
+2008-11-21  Marek Habersack  <mhabersack@novell.com>
+
+       * CompilationException.cs: made serializable.
+
+       * TemplateControlCompiler.cs: make the Bind regex stricter.
+       When creating Eval expression from Bind, replace single quotes
+       with double quotes. Fixes bug #447597
+       When processing Bind expressions and the regex doesn't match,
+       throw an exception.
+
+2008-11-17 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * AspTokenizer.cs: if there's a newline between the opening server tag
+       and any other special character, treat the block as a code-render
+       block.
+       Bug #445889 fixed.
+
+2008-11-14  Marek Habersack  <mhabersack@novell.com>
+
+       * TemplateControlCompiler.cs: treat Eval and Bind expressions as
+       verbatim code. The only difference between the two is that in the
+       latter case Bind is replaced with Eval in the output code. Fixes
+       bug #444725
+       If BindingDirection of the parent template builder is OneWay in
+       RegisterBindingInfo, do not throw an exception but simply do not
+       register the binding.
+
+2008-10-29  Marek Habersack  <mhabersack@novell.com>
+
+       * BuildManager.cs: seal the internal classes.
+       Remove unused BuildCacheItem.ValidBuild property.
+
+2008-10-16  Marek Habersack  <mhabersack@novell.com>
+
+       * TemplateControlCompiler.cs: IsWritablePropertyOrField doesn't
+       use PropertyInfo.CanWrite to check whether the property is
+       writable anymore, it calls GetSetMethod (false) instead.
+
+2008-10-10  Marek Habersack  <mhabersack@novell.com>
+
+       * TemplateControlCompiler.cs: allow whitespace around parentheses 
+       in the Bind and Eval expressions.
+
+2008-10-09  Marek Habersack  <mhabersack@novell.com>
+
+       * 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-08  Marek Habersack  <mhabersack@novell.com>
+
+       * TemplateControlCompiler.cs: templates must be instantiated even
+       for builders which process children as properties.
+
+2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * AssemblyBuilder.cs: use CodeBase to get to the original assembly
+       path because Location might point the the shadow copy. Bug #409646
+       and others fixed.
+
+2008-10-03  Marek Habersack  <mhabersack@novell.com>
+
+       * 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.
+
+2008-09-29  Marek Habersack  <mhabersack@novell.com>
+
+       * BuildManagerRemoveEntryEventHandler.cs: added
+
+       * BuildManager.cs: added a static event to notify interested
+       parties when an entry is removed from the buildCache. Fixes bug
+       #429926.
+
+2008-09-26  Marek Habersack  <mhabersack@novell.com>
+
+       * 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
+
+2008-09-24  Andreia Gaita <avidigal@novell.com> 
+       * AspParser.cs: When parsing text which contain xml tags that resemble
+       the end string, append the original text instead of the end string,
+       because the casing might not match between the two. Fixes #320445
+
+2008-09-23  Marek Habersack  <mhabersack@novell.com>
+
+       * AspGenerator.cs: ignore whitespace only if it's between
+       CodeRender blocks, not between DataBinding and
+       CodeRenderExpression.
+
+2008-09-01  Marek Habersack  <mhabersack@novell.com>
+
+       * BaseCompiler.cs: AssignAppRelativeVirtualPath works with
+       null/empty parser.InputFile now.
+
+       * AspGenerator.cs: AddTypeToCache works checks whether inputFile
+       is null or empty and does not assume the dependencies ArrayList is
+       present.
+       CloseControl uses ControlBuilder's OriginalTagName property,
+       should the property/tag name be prefixed with 'prefix:'
+
+       * CachingCompiler.cs: expect the dependencies ArrayList to be null
+       or empty.
+
+2008-08-31  Marek Habersack  <mhabersack@novell.com>
+
+       * TemplateControlCompiler.cs: trust builder.BindingContainerType
+       in the 2.0+ profile - do not use container properties to detect
+       the type.
+       Added a helper method, compiled only when DEBUG is defined, to
+       generate Console.WriteLine CodeDOM calls.
+       Templates are processed before anything else, so that children
+       which may depend on parent's templates can get access to them.
+
+       * BaseCompiler.cs: add line pragmas only if enabled for the
+       current file.
+
+2008-08-29  Marek Habersack  <mhabersack@novell.com>
+
+       * AppCodeCompiler.cs: properly handle profile base class
+       specifications which refer to full type names.
+
+2008-08-26  Marek Habersack  <mhabersack@novell.com>
+
+       * BuildManager.cs: use VirtualPathUtility.Combine in
+       GetAbsoluteVirtualPath for non-rooted paths.
+
 2008-08-19  Marek Habersack  <mhabersack@novell.com>
 
        * ThemeDirectoryBuildProvider.cs: theme directory dependencies