Commit Graph
18 Commits
Author SHA1 Message Date
Martin Baulig 0d0f4ae035 [xbuild]: Check a <Target>'s "Returns" first, then fall-back to "Outputs".
This fixes a problem with the "Microsoft.Bcl.Build" NuGet package, which
overrides the "GetTargetPath" target in a custom .targets file and uses
"Returns" instead of "Outputs".
2013-12-04 01:58:06 +01:00
Ankit Jain 2f3d65b5c3 In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
* Expression.cs (ExpressionOptions): New.

	Introduce a ExpressionOptions argument to all ConvertTo*
	methods. Implement the rule: in evaluation phase, expand
	all items completely, but dont expand item refs in properties.
	At other times, expand the item refs in the properties.
	See comments in Expression.cs, for a full explanation.
	* BuildItem.cs: Track api changes.
	* BuildItemGroup.cs: Likewise.
	* BuildProperty.cs: Track api changes. Handle self-references.
	* BuildTask.cs: Track api changes.
	* IReference.cs: Add ExpressionOptions param.
	* ItemReference.cs: Track api changes.
	* PropertyReference.cs: Likewise.
	* MetadataReference.cs: Likewise.
	* ExpressionCollection.cs: Track api changes. Add support for
	converting all primitive types and DateTime, instead of a fixed
	few.
	* Project.cs (GetMetadataBatched): Use the evaluated metadata.
	* TaskBatchingImpl.cs: Handle the case when batching is required,
	but no items are available.

	* TaskEngine.cs: Throw on unsupported types. Correctly handle
	properties in case of empty values.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:

	* BuildItemTest.cs (TestSetMetadata5a): New.
	* ProjectTest.cs: Add tests for different property types
	with required attribute. Also, check the values - null or
	empty array.
	* TestTasks.cs: Add new tasks for above.

In class/Microsoft.Build.Engine/Test/resources:

	* TestTasks.cs: Add new tasks for different property types
	with required attribute. Also, emit whether the value was
	null or a zero length array.

In class/Microsoft.Build.Engine/Test/various:

	* Items.cs: Add tests for property/item evaluation.

svn path=/trunk/mcs/; revision=140911
2009-08-28 21:55:29 +00:00
Jonathan Chambers 4d00ac70fd 2009-03-26 Jonathan Chambers <[email protected]>
* TaskDatabase.cs (RegisterTask): Search for class by name
        if task was not found using GetType (which uses namespace).



svn path=/trunk/mcs/; revision=130305
2009-03-26 15:47:25 +00:00
Ankit Jain bd33dcb033 Lazily load UsingTask tasks.
In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:

	Lazily load UsingTask tasks.
	* UsingTask.cs (Evaluate): Register 'this' with task database,
	but don't load it yet. Register only if condition evaluates to true.
	Move the load logic to ..
	(Load): .. here. Register with the specified task database.
	* TaskDatabase.cs (RegisterUsingTask): Store the UsingTask instance
	in a table keyed by task name, but don't load it yet.
	(GetTypeFromClassName): Try to load UsingTask if task is not already
	loaded. Move loading logic to ..
	(GetTypeFromClassNameInternal): .. here.
	(CopyTasks): Copy the usingTasks table also.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:

	* UsingTaskTest.cs (TestLazyLoad{1,2,3}): New.
	(TestAssemblyNameOrAssemblyFileConditionFalse): New.
	(TestDuplicate1): New.
	* TargetTest (CheckLoggedMessageHead): Moved to TestMessageLogger,
	use that.

In class/Microsoft.Build.Engine/Test/resources:

	* TestTasks.cs (Another.SameTask): New.
	(Other.SameTask): New.

In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks:

	* TestMessageLogger.cs (CheckLoggedMessageHead): Move here from
	* TaskBatchingTest.cs: .. here. Track api change.

svn path=/trunk/mcs/; revision=127830
2009-02-24 00:12:25 +00:00
Ankit Jain 0e7783175b In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
* TaskEngine.cs (GetObjectFromString): Empty value is allowed only for
	arrays.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:

	* ProjectTest.cs (TestRequiredTask_*): New.
	(TestBatchedMetadataRef5): New.

In class/Microsoft.Build.Engine/Test/resources:

	* TestTasks.cs (RequiredTestTask): Rename to ..
	(RequiredTestTask_TaskItems): .. this.
	(RequiredTestTask_*): New types.

svn path=/trunk/mcs/; revision=125076
2009-01-30 12:27:45 +00:00
Ankit Jain 8657a158fb In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
* BuildItem.cs (child_items): Change type from BuildItemGroup to
	List<BuildItem>.
	(HasParent): Rename to ..
	(HasParentItem): .. this.
	(ParentItemGroup): Add setter.

	* BuildItemGroup.cs (.ctor): Add overload with @project param.
	(AddNewItem):
	(AddItem): Correctly set the ParentItemGroup for new build items.
	(ParentProject): Add setter.
	* Project.cs: Set the project for new BuildItemGroup instances.
	* TaskEngine.cs (PublishItemGroup): Likewise.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:

	* BuildItemTest.cs (TestBuildItemTransform): New.

In class/Microsoft.Build.Engine/Test/resources:

	* TestTasks.cs (BatchingTestTask.TaskItemsOutput): New.

svn path=/trunk/mcs/; revision=124840
2009-01-28 20:05:01 +00:00
Ankit Jain 8f416a1033 In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
* MetadataReference.cs (BuildItemGroupToITaskItems): Return unique
	metadata values for unqualified references.
	(BuildItemGroupToITaskItemArray): Rename to ..
	(BuildItemGroupToITaskItems): .. this.
	(HasTaskItem): New.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:

	* ProjectTest.cs (TestBatchedMetadataRef[23]): Modify to check for
	multiple items with same metadata value, incase of unqualified metadata
	references.
	Track changes in BatchingTestTask.

In class/Microsoft.Build.Engine/Test/resources:

	* TestTasks.cs (BatchingTestTask): Add specific properties
	for string and string[].

svn path=/trunk/mcs/; revision=122246
2008-12-30 15:49:05 +00:00
Ankit Jain 363b18904a In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
* ExpressionCollection.cs (ConvertToITaskItemArray): Add support for
	MetadataReference.
	* MetadataReference.cs (ConvertToITaskItemArray): New.
	* Project.cs (GetAllItemGroups): New.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:

	* ProjectTest.cs (TestBatchedMetadataRef*): New tests for metadata
	references.

In class/Microsoft.Build.Engine/Test/resources:

	* TestTasks.cs (BatchingTestTask): New.

svn path=/trunk/mcs/; revision=119668
2008-11-21 20:27:57 +00:00
Marek Sieradzki 43fb246720 In Test/Microsoft.Build.BuildEngine:
2007-01-08  Marek Sieradzki  <[email protected]>

        * ImportTest.cs: Added test for project importing another project
        importing another project.

In Microsoft.Build.BuildEngine:
2007-01-08  Marek Sieradzki  <[email protected]>

        * Import.cs (GetFullPath): Avoid exceptions from Path.GetDirectoryName
        and prepend relative directory of importing project to full path of
        imported project.


svn path=/trunk/mcs/; revision=70648
2007-01-08 13:06:35 +00:00
Marek Sieradzki cc2fb6548a More tasks.
svn path=/trunk/mcs/; revision=70341
2007-01-02 11:06:07 +00:00
Marek Sieradzki b726ed8201 2006-12-18 Marek Sieradzki <[email protected]>
* Items.cs: More tests.


svn path=/trunk/mcs/; revision=69687
2006-12-18 21:27:05 +00:00
Marek Sieradzki 12e8681648 Forgot this file.
svn path=/trunk/mcs/; revision=69556
2006-12-15 23:23:27 +00:00
Marek Sieradzki 030cee0043 In Microsoft.Build.Engine/Test:
2006-12-12  Marek Sieradzki  <[email protected]>

        * ImportTest.cs: Added test for IsImported on imported BuildItemGroup.

In Microsoft.Build.Engine/Microsoft.Build.BuildEngine:

2006-12-12  Marek Sieradzki  <[email protected]>

        * BuildItemGroup.cs (ctor): Add reference to ImportedProject from
        which item group is imported.

        * BuildItem.cs, Project.cs: Use new BuildItemGroup.ctor ().


svn path=/trunk/mcs/; revision=69374
2006-12-11 23:25:43 +00:00
Marek Sieradzki 55065280af 2006-12-04 Marek Sieradzki <[email protected]>
* EvaluationOrder.cs, Condition.cs: Added.


svn path=/trunk/mcs/; revision=68962
2006-12-04 16:21:59 +00:00
Marek Sieradzki b34b42b952 2006-06-22 Marek Sieradzki <[email protected]>
* UsingTaskCollectionTest.cs, UsingTaskTest.cs: Updated names.
        * ProjectTest.cs: Moved most of the old tests to various/.
        * Consts.cs: Added.


svn path=/trunk/mcs/; revision=61956
2006-06-22 20:16:59 +00:00
Marek Sieradzki 9aae01b78b 2006-06-14 Marek Sieradzki <[email protected]>
* BuildPropertyGroupTest.cs: Added some tests.
        * UsingTaskCollectionTest.cs: Added very simple test.
        * UsingTaskTest.cs: Added test that's loading SimpleTask.dll task from
        Test/resources/. Test/resources/SimpleTask.cs should be compiled
        before running tests. I need to find out how to add it to Makefile.


svn path=/trunk/mcs/; revision=61714
2006-06-14 21:44:49 +00:00
Marek Sieradzki 9e1e8fe360 2006-05-03 Marek Sieradzki <[email protected]>
* ProjectTest.cs, EngineTest.cs: Corrected BinPath once more.


svn path=/trunk/mcs/; revision=60213
2006-05-03 10:46:13 +00:00
Marek Sieradzki de5d9d7de6 2006-04-24 Marek Sieradzki <[email protected]>
* ProjectTest.cs, EngineTest.cs: Corrected BinPath.


svn path=/trunk/mcs/; revision=59812
2006-04-24 14:18:38 +00:00