You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by br...@apache.org on 2013/02/05 01:19:53 UTC

svn commit: r1442450 - in /incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src: main/csharp/Converter/Algorithms/ test/resource/SilverlightApplication1/SilverlightApplication1/ test/resource/SilverlightApplication1/SilverlightA...

Author: brett
Date: Tue Feb  5 01:19:52 2013
New Revision: 1442450

URL: http://svn.apache.org/viewvc?rev=1442450&view=rev
Log:
Exclude Silverlight SDK libraries from the POM

This was causing the unit tests to fail as soon as System.Windows is installed
in the GAC as it generates an additional element, and was causing the wrong
System.Net reference to be included in POMs previously. These libraries differ
from the ones provided by the SDK that MSBuild refers to and are used at
runtime.

Modified:
    incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/NormalPomConverter.cs
    incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/SilverlightPomConverter.cs
    incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightApplication1/pom.test
    incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightApplication2/pom.test
    incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightClassLibrary1/pom.test
    incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication5/SilverlightApplication5/pom.test

Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/NormalPomConverter.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/NormalPomConverter.cs?rev=1442450&r1=1442449&r2=1442450&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/NormalPomConverter.cs (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/NormalPomConverter.cs Tue Feb  5 01:19:52 2013
@@ -214,7 +214,7 @@ namespace NPanday.ProjectImporter.Conver
 
 
             // filter the rsp included assemblies
-            FilterRSPIncludedReferences();
+            FilterReferences();
             // Add Project Reference Dependencies
             AddProjectReferenceDependenciesToList();
 
@@ -226,29 +226,35 @@ namespace NPanday.ProjectImporter.Conver
 
         }
 
-
-
-        protected void FilterRSPIncludedReferences()
+        protected void FilterSdkReferences(List<string> sdkReferences)
         {
             List<Reference> list = new List<Reference>();
 
             foreach (Reference reference in projectDigest.References)
             {
-                if (!string.IsNullOrEmpty(projectDigest.Language))
+                if (!sdkReferences.Contains(reference.Name))
                 {
-                    if (!rspUtil.IsRspIncluded(reference.Name, projectDigest.Language))
+                    if (!string.IsNullOrEmpty(projectDigest.Language))
+                    {
+                        if (!rspUtil.IsRspIncluded(reference.Name, projectDigest.Language))
+                        {
+                            list.Add(reference);
+                        }
+                    }
+                    else
                     {
                         list.Add(reference);
                     }
                 }
-                else
-                {
-                    list.Add(reference);
-                }
             }
             projectDigest.References = list.ToArray();
         }
 
+        protected void FilterReferences()
+        {
+            FilterSdkReferences(new List<string>());
+        }
+
 
     }
 }

Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/SilverlightPomConverter.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/SilverlightPomConverter.cs?rev=1442450&r1=1442449&r2=1442450&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/SilverlightPomConverter.cs (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/main/csharp/Converter/Algorithms/SilverlightPomConverter.cs Tue Feb  5 01:19:52 2013
@@ -95,8 +95,16 @@ namespace NPanday.ProjectImporter.Conver
             // Add Project Inter-dependencies
             AddInterProjectDependenciesToList();
 
-            // filter the rsp included assemblies
-            FilterRSPIncludedReferences();
+            // filter the rsp and SDK included assemblies
+            //  This includes just a subset of the provided libraries that are automatically available to a Silverlight application.
+            //  Setting them to 'provided' scope may be more accurate, if NPanday core were to support it. The motivation is to avoid
+            //  Adding incorrect dependencies referring to the GAC which are likely to be inconsistent across generations (including
+            //  making the unit tests for this class fail).
+            List<string> sdkReferences = new List<string>();
+            sdkReferences.Add("System.Windows");
+            sdkReferences.Add("System.Windows.Browser");
+            sdkReferences.Add("System.Net");
+            FilterSdkReferences(sdkReferences);
 
             // Add Project Reference Dependencies
             AddProjectReferenceDependenciesToList();

Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightApplication1/pom.test
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightApplication1/pom.test?rev=1442450&r1=1442449&r2=1442450&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightApplication1/pom.test (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightApplication1/pom.test Tue Feb  5 01:19:52 2013
@@ -34,12 +34,5 @@
       <version>1.2.3-SNAPSHOT</version>
       <type>library</type>
     </dependency>
-    <dependency>
-      <groupId>System.Net</groupId>
-      <artifactId>System.Net</artifactId>
-      <version>3.5.0.0</version>
-      <type>gac_msil</type>
-      <classifier>b03f5f7f11d50a3a</classifier>
-    </dependency>
   </dependencies>
 </project>

Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightApplication2/pom.test
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightApplication2/pom.test?rev=1442450&r1=1442449&r2=1442450&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightApplication2/pom.test (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightApplication2/pom.test Tue Feb  5 01:19:52 2013
@@ -27,13 +27,4 @@
       </plugin>
     </plugins>
   </build>
-  <dependencies>
-    <dependency>
-      <groupId>System.Net</groupId>
-      <artifactId>System.Net</artifactId>
-      <version>3.5.0.0</version>
-      <type>gac_msil</type>
-      <classifier>b03f5f7f11d50a3a</classifier>
-    </dependency>
-  </dependencies>
 </project>

Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightClassLibrary1/pom.test
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightClassLibrary1/pom.test?rev=1442450&r1=1442449&r2=1442450&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightClassLibrary1/pom.test (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication1/SilverlightClassLibrary1/pom.test Tue Feb  5 01:19:52 2013
@@ -27,13 +27,4 @@
       </plugin>
     </plugins>
   </build>
-  <dependencies>
-    <dependency>
-      <groupId>System.Net</groupId>
-      <artifactId>System.Net</artifactId>
-      <version>3.5.0.0</version>
-      <type>gac_msil</type>
-      <classifier>b03f5f7f11d50a3a</classifier>
-    </dependency>
-  </dependencies>
 </project>

Modified: incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication5/SilverlightApplication5/pom.test
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication5/SilverlightApplication5/pom.test?rev=1442450&r1=1442449&r2=1442450&view=diff
==============================================================================
--- incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication5/SilverlightApplication5/pom.test (original)
+++ incubator/npanday/trunk/dotnet/assemblies/NPanday.ProjectImporter/Engine/src/test/resource/SilverlightApplication5/SilverlightApplication5/pom.test Tue Feb  5 01:19:52 2013
@@ -27,13 +27,4 @@
       </plugin>
     </plugins>
   </build>
-  <dependencies>
-    <dependency>
-      <groupId>System.Net</groupId>
-      <artifactId>System.Net</artifactId>
-      <version>3.5.0.0</version>
-      <type>gac_msil</type>
-      <classifier>b03f5f7f11d50a3a</classifier>
-    </dependency>
-  </dependencies>
-</project>
\ No newline at end of file
+</project>