Commit Graph
46 Commits
Author SHA1 Message Date
Eric Mellino b8670dea2f Add facade projects for all supported platforms
These facade project files were generated using a porting tool I wrote,
which examined some information from our internal build and created
appropriate project files. I have also re-generated all of the .builds
files so that they import the facade projects in the correct manner.


Commit migrated from https://github.com/dotnet/corefx/commit/58e2f6e862060039e1ebad727d75c87703fdb2f2
2015-12-10 10:29:09 -08:00
dagood fbfb82cc8c Change all project.json files to validate. Remove lockfiles from source control and add to gitignore.
A few new references to pick up changes that happened over time.


Commit migrated from https://github.com/dotnet/corefx/commit/0d881222d8c3269157639e2e67056e5a83aad834
2015-12-09 16:25:26 -06:00
Deepak Shankargouda f5284f6fcc Created initial set of .builds files
Commit migrated from https://github.com/dotnet/corefx/commit/a20fd22b1e44d13e437c235a957a47a2af52838d
2015-12-02 14:38:03 -08:00
VSadov cbd27be326 Merge pull request dotnet/corefx#3751 from JonHanna/expression_new_vistor
Use new visitor class for EnumerableQuery expressions.

Commit migrated from https://github.com/dotnet/corefx/commit/fb968fc25ab511e725a3614868e9e6dab74f60ac
2015-11-14 12:35:47 -08:00
Jon Hanna 8145df5bf0 Don't construct dictionaries in EnumerableRewriter unless they are used.
Commit migrated from https://github.com/dotnet/corefx/commit/64ef4cf881e085470069aef320c3197285fd426e
2015-11-13 11:23:48 +00:00
Eric St. John 65210efd31 Update project.lock.json to latest and lock
Commit migrated from https://github.com/dotnet/corefx/commit/6aeea5eabf2aff3baf15f501cabd156dfc5b3f8f
2015-11-09 22:38:10 -08:00
Eric St. John cddddd29f5 Remove unused dependencies
Commit migrated from https://github.com/dotnet/corefx/commit/78fd45ec74afc507a40df519b4df650ac9bd4c42
2015-11-09 22:37:37 -08:00
Jon Hanna d247c7bc19 Remove error methods that are no longer ever hit.
Commit migrated from https://github.com/dotnet/corefx/commit/cdb16d986aa3b444044658f6b46e5d28bb728466
2015-10-26 15:28:47 +00:00
Jon Hanna 4c1819b96f Use new visitor class for EnumerableQuery expressions.
Fixes dotnet/corefx#3607

Have EnumerableRewriter inherit from ExpressionVisitor, hence allowing those
Expression classes introduced after 3.5 to be used. Also handle explicit
typing of those expressions that can be explicitly typed.


Commit migrated from https://github.com/dotnet/corefx/commit/0f0c1874f877bb16d2574b0b9fab930b7b3620a6
2015-10-26 15:28:35 +00:00
Eric St. John 8cc3c24b51 Update lock files that were missed in previous restore.
A change was made to DNX to no longer restore project.jsons
that are in nested folders.  This caused my batch update to miss
a number of tests and reference assembly projects.

This fixes the stale lock files, but restore is still broken.

[tfs-changeset: 1540448]


Commit migrated from https://github.com/dotnet/corefx/commit/3622cccc1b22fa1947a72d5126b59864e9d2fd0d
2015-10-21 18:59:09 -07:00
Eric St. John 543808303a Update dnx to v1.0.0-rc1-15838, update dotnet projects to generations
We need a new DNX to understand the latest packages.

We also need to move all "dotnet" projects to use dotnetX.X (generations)
now that the packages no longer have "dotnet" assets.

The new version of DNX dropped support for the aspnetcore
so I needed to update a few projects/packages that depended
on old package versions that had this moniker.

[tfs-changeset: 1540388]


Commit migrated from https://github.com/dotnet/corefx/commit/38f8d7a3ca1ee819c2b8eabb1c07ee4e99683c97
2015-10-21 17:03:48 -07:00
bartonjs a768025131 Update all project.lock.json files
Built Windows_NT, Linux, OSX with /p:LockDependencies=true.

CoreFX beta-* => 23419
xunit.netcore.extensions => 00107


Commit migrated from https://github.com/dotnet/corefx/commit/a14b22705df253508bd5f2dab0407bd2c7e4d639
2015-10-19 16:00:44 -07:00
Eric St. John 8cd3109d56 Switch from using "dotnet" to using "dotnet<generation>"
All projects that previously used dotnet have been updated to specify the appropriate generation of the surface area they depend on or in the case of desktop inbox contracts, the generation that includes the set of platforms they can support.

Now all packages contain all generations of API that they have ever shipped.

In doing this I needed to change how we determine package version.  Before we ensured all assemblies would have the same version and used that.  Now we choose the max.

Additionally I needed to change how we chose which asset to use for netcore50 when the dotnet asset was obscured by a placeholder for a previous netcore release (eg System.Runtime will have placeholders for Win8 since it was inbox there).  To do this I wrote a task that uses nuget to evaluate the package assets with and without the placeholders.  In this way it chooses the "best" dotnet implementation and reference assembly to use for netcore50.

This new model made my old MSBuild-based validation impossible to carry forward, so I wrote better validation in a task that actually uses Nuget's asset resolution algorithm.  This uncovered many existing issues in packages that I have cleaned up.  The validation algorithm could use some polish but its working now.  Perf is not great, package build went from 15s to ~2 minutes.  I'll work on this some more by making it incremental (input: nuspec, output: marker created on success).  Profiling shows that most of the time is spent in calling the nuget APIs.  I'll see if I can reduce some of this with caching for things that don't change (eg: RID graph).  Ultimately I think its a reasonable tradeoff for the types of bugs I can find this way.

[tfs-changeset: 1539216]


Commit migrated from https://github.com/dotnet/corefx/commit/0931c347eb836c9da94d0d5ff9ad7a14403b9738
2015-10-18 21:12:23 -07:00
Jon Hanna 61182200a3 Remove needless checks on creating ReadOnlyCollection in Linq.Queryable
System.Linq.Queryable uses ReadOnlyCollectionExtensions to create
ReadOnlyCollection instances in a way that should increase aliasing (hence
reducing allocations), and guarantee that the underlying collection is not
mutated elsewhere.

However, the only paths that hit it do so with collections that will never
be already ReadOnlyCollection (one possible alias opportunity gone) or empty
or null (the other gone). Nor will the collections ever be accessed by any
other code (removing the risk of mutation).

Futher, while the use of `ToArray()` also gives the lightest possible choice
for contained collection, with an advantage on memory pressure if the instance
was long-lasting, all collections so-produced are soon eligible for collection,
so calling `ToArray()` just leads to more allocations unnecessarily, along with
having a more costly interface invocation.

Therefore, replace such uses with `List<T>`'s `AsReadOnly()`.


Commit migrated from https://github.com/dotnet/corefx/commit/bfa812bd8d362f9f7cba8a75711a16213a7751a1
2015-10-13 11:32:00 +01:00
VSadov 61ee80b742 Merge pull request dotnet/corefx#3527 from JonHanna/queryable_remove_redundancies
Remove some redundancies from System.Linq.Queryable

Commit migrated from https://github.com/dotnet/corefx/commit/ceae1d38c93e3f53210ad91884dabc1bd6d30a90
2015-10-10 15:26:52 -07:00
VSadov 3e198f6d09 Merge pull request dotnet/corefx#3547 from JonHanna/enumerablequery_prevent_stackoverflow
Prevent stack overflow from EnumerableQuery of null enumerable

Commit migrated from https://github.com/dotnet/corefx/commit/4554758fbfe2aee3a8c18420d00104af761307cf
2015-10-10 08:55:33 -07:00
Jon Hanna 55e70d28ee Add tests for EnumerableQuery created from expression.
Try to cover a large range of possible expressions.


Commit migrated from https://github.com/dotnet/corefx/commit/6b05f714a20d5fb2812d01bc45e672ecdc1404e8
2015-10-02 16:35:43 +01:00
Ian Hays 0f8197a86c Update CoreFX to xunit 2.1.0
Commit migrated from https://github.com/dotnet/corefx/commit/87b48c58936d66fcb201b3a8ad0961fa055f23b9
2015-10-01 19:56:49 -07:00
Jon Hanna 81faa78aca Don't cache Func<T> produced by EnumerableExecutor<T>
Method is never called twice on same instance, so caching saves nothing.

Remove redundant array creation.

 No calling code benefits from this. Use Where rather than explicit
 filtering with yield as one caller then uses Where so the predicates
 can be combined.

Hold result of repeated calls to GetTypeInfo in local

Hold result of repeated calls to Method getter in local

Don't construct array just to select just one element from it.


Commit migrated from https://github.com/dotnet/corefx/commit/df648a8f60ac70113bdcbb2695ce87e3ef320dee
2015-09-30 17:44:43 +01:00
Jon Hanna 26427d9f36 Prevent stack overflow from EnumerableQuery of null enumerable
Fixes dotnet/corefx#3546

If an EnumerableQuery is created from a null IEnumerable<T>, calling
GetEnumerator() will cause infinite recursion. Change this to throw
immediately.


Commit migrated from https://github.com/dotnet/corefx/commit/01ee1a956ee9d4e4a0f7c8927ac5da3f5faf5927
2015-09-30 17:32:40 +01:00
Jon Hanna 927b29c81a Add EnumerableQuery tests
Commit migrated from https://github.com/dotnet/corefx/commit/4511c6fd77195ce0e8fa4c5c30a7b298d11bfb79
2015-09-30 14:34:37 +01:00
Jon Hanna 3fabee3b17 Simple removal one line redundant code.
ReadOnlyCollection is used to create an array, but that array is then never
used.

As the collection cannot be null, doesn't even change exception timing of null
reference to remove it, just removes redundant array construction.


Commit migrated from https://github.com/dotnet/corefx/commit/fd7231fc7227e8c0b1cb5cc271c013fdf96ce8d4
2015-09-29 02:50:24 +01:00
Jon Hanna 60db07d653 Increase test coverage of System.Linq.Queryable
Adapt Enumerable tests for Queryable.

Copy tests for System.Linq.Enumerable.

Remove those specific to Enumerable, varying to test implementation details of
Enumerable, testing promises of Enumerable that Queryable doesn't promise (e.g.
stability in OrderBy), or otherwise not relevant.

Move the previous tests in QueryableTests into the relevant class introduced
with this.

Add some tests for runtime error checks not covered by this.

Increases line/branch coverage of assembly from 74.5%/44.7% to 85.6%/75.5% with
System.Linq.Queryable going from 86.8%/50.2% to 100%/100%.


Commit migrated from https://github.com/dotnet/corefx/commit/198551e1b26fea4915f8ba3fae2fa6678c637846
2015-09-25 01:05:39 +01:00
Nick Guerrera 0b930f454e Remove and fix incorrect reflection helpers
There were two instances in the code of trying to mimic the old
Type.GetGenericArguments() with TypeInfo API that were incorrect.
Both attempts ignored that TypeInfo separates generic type definition
parameters from generic instantiation arguments.

Case 1: System.Linq.Expressions.Tests
--------------------------------------
These already had a reference to System.Reflection.TypeExtensions,
which provides all of the compatibility API it needed, so the custom
helpers are simply deleted.

Case 2: System.Linq.Queryable
-----------------------------
This library doesn't depend on System.Reflection.TypeExtensions and
so the trivial helper is left there but corrected to match the expected
behavior of the classic API.


Commit migrated from https://github.com/dotnet/corefx/commit/cba086e8a35fadf3b44a949a7a3fd6cd0c2e003f
2015-09-17 12:57:47 -07:00
Alexander Köplinger 3e20a867b2 Update build to use DNX beta7 instead of beta5
The corefx build used an older beta5 version of DNX which hardcoded the path to bash in dnu, breaking the build on FreeBSD.
Updating DNX to the latest "stable" beta7 release fixes this.

After updating I noticed a few test projects didn't build anymore as they were missing some dependencies in project.json, added those.

Fixes dotnet/corefx#3173


Commit migrated from https://github.com/dotnet/corefx/commit/6df77fdbb6cf8e0d35a3074bb325f7810085daa3
2015-09-16 02:12:26 +02:00
Jon Hanna 144807d61c Combine is-operator-then-cast sequences.
Convert some cases of the form:

    if (value is T) ((T)value).DoSomething();

Etc. Into:

    T tValue = value as T;
    if (tValue != null) tValue.DoSomething();

Slightly smaller IL output, and removes double-cast in the case that uses it.


Commit migrated from https://github.com/dotnet/corefx/commit/6026ec5993a98c5a03c04a48a68f1d6ed346f8bc
2015-08-18 03:34:21 +01:00
Eric St. John d7a0ae297b Update corefx packages to latest
Commit migrated from https://github.com/dotnet/corefx/commit/23f0b695bd162e0f665427c95180dc21931e5c70
2015-08-14 15:43:23 -07:00
Eric St. John 77309d4821 Update the version of all assemblies
This change updates the assembly versions of all of the corefx assemblies
as needed after we shipped stable versions.  Assemblies with API differences
get a minor version bump.  Assemblies with only bugfixes get a build version
bump.

In order to facilitate this I had to update the reference assemblies, so I took
the opportunity to port them all to the open.

[tfs-changeset: 1514419]


Commit migrated from https://github.com/dotnet/corefx/commit/40723b795917f2e98b64d45c17effb2546dd0cae
2015-08-13 17:07:57 -07:00
Eric Mellino 66969e748b Re-lock dependencies with latest xunit
Commit migrated from https://github.com/dotnet/corefx/commit/795cbc75f8e167047a7c19cd7e21e99b9b9f4308
2015-08-03 16:40:33 -07:00
Eric Mellino 219af47e0c Update test dependencies
Fixes all test warnings about 'different versions of the same dependent
assembly'


Commit migrated from https://github.com/dotnet/corefx/commit/b84f53f744ba0418255cbe471b783dde2a700a8e
2015-08-03 13:44:34 -07:00
Eric Mellino c0015fc582 Move all tests to latest xunit beta
Commit migrated from https://github.com/dotnet/corefx/commit/7c12b0120834f92d5c591124f692ea1b64c6a877
2015-08-03 11:27:48 -07:00
Eric St. John 47aaf9fcf8 Use stable package dependencies and move our packages to post-stable versions
This change modifies the build to consume the stable version where available.

This disables building the dowlevel packages since we shipped them once as stable and we're done.
From here on out, we'll only build the latest version (except for a servicing event, which would
be handled by syncing to a hash).

I can't rev the package versions in the normal way yet (by modifying the assembly version of the contents)
because that turned out to be too big of a problem to tackle in this change. Instead I added a
parameter to the task that calculates package versions to do the rev for anything that was
stable, but only when building the package itself, not when calculating the dependencies.
This has the downside of not permitting a dependency on a incremented pre-release version if we've
shipped a stable version, but that is a small point in time problem until I can rev the assembly
versions.

[tfs-changeset: 1508664]


Commit migrated from https://github.com/dotnet/corefx/commit/ee1ec2891c7c65b46fa9dfb078636be503bb2a60
2015-07-31 15:47:51 -07:00
Nick Guerrera 4c28436d2e Update package dependency versions
Commit migrated from https://github.com/dotnet/corefx/commit/0c6b87e4e67e80b5d751bcd6883ca6e89fb68157
2015-06-24 14:04:15 -07:00
Eric StJohn 1a58e04134 Update corefx packages to version 23011
Commit migrated from https://github.com/dotnet/corefx/commit/3bb2f035a7c1f6168a6bd34fbf3851f7eedf76bf
2015-06-19 16:33:53 -07:00
stephentoub 68b0c18d2d Update all project.lock.json files
Used:
build.cmd /t:RestorePackage /p:LockDependencies=true


Commit migrated from https://github.com/dotnet/corefx/commit/76fcb7ab9444f68577ca0ec17055ca8c4e574b75
2015-06-10 10:19:11 -04:00
Eric StJohn e8454e28a5 Update projects to latest CoreFx packages
This is the result of build /t:RestorePackages /p:LockDependencies=true from the root.

This adds all missing project.lock.json files and updates existing ones to the latest package versions.


Commit migrated from https://github.com/dotnet/corefx/commit/38e0d2a0f8513afe6dc7d86a67e5776ab7b99df1
2015-05-27 12:18:06 -07:00
Eric St. John a8788d6383 Lock dependencies to ensure we build against a predictable package version
This change adds the lock files to repo to ensure we build against a stable set of dependencies.  To explicitly update dependencies use build.cmd /T:RestorePackages /P:LockDependencies=true and this will pick up the latest depenedencies.

Existing projects adding new dependencies will automatically update the lock file incrementally.

New projects should make sure to check their lock file in with locked set to true.

[tfs-changeset: 1474296]


Commit migrated from https://github.com/dotnet/corefx/commit/d2fbc005707933db1cebca035d6cd6073af6cae4
2015-05-21 15:23:27 -07:00
Eric St. John de6614c63a Update to latest CoreFx packages
Latest packages are now on dotnet-core myget feed.

This should address a many of the warnings in the build.  I will follow up with another change to address the rest.

This change brings in the latest build tools with updates to consume "latest" packages (* versions).

I've updated every project in the repo to use * versioning for dependencies.

The new packages can be used to resolve runtime assets as well (like clrcompression.dll) so I have removed the custom code in System.IO.Compression to copy this dll.  Instead the test project references the actual System.IO.Compression package and sets the correct runtime IDs to pull out the resources.  The System.IO.Compression.dll from the package is not used since the project reference takes precedence.

I had to workaround an issue in System.Xml.XmlSerializer with the current packages: System.Runtime.WindowsRuntime 4.0.0 has a depedendency on "windows" package which doesn't exist.  This was caused by our auto-generation task not filtering the winrt reference in the reference assembly's surface area.  I've fixed this in a separate change and we can remove the workaround once we have a new set of packages.  https://github.com/dotnet/corefx/issues/1761

I also had to add a dependency to System.Security.Cryptography.Hashing.Algorithms\tests due to an issue with DNX.  It's not honoring the dependency group with no targetFramework when another dependency group exists in the nuspec.  This is inconsistent with nuget v2 and should be fixed in DNX.  https://github.com/aspnet/dnx/issues/1881

[tfs-changeset: 1471885]


Commit migrated from https://github.com/dotnet/corefx/commit/08c0d8628ef621fbd44d7aaa85b3239616a6b108
2015-05-15 12:40:33 -07:00
dotnet-bot 738fb70e22 Eliminate lifting in Queryable extensions to avoid reflecting over private fields.
(port changeset

[tfs-changeset: 1468586]


Commit migrated from https://github.com/dotnet/corefx/commit/ef7f870f7912cfdcfbf3ed75797f9751268cb7dc
2015-05-11 17:44:09 -07:00
Eric StJohn 5db3ae33bf Convert all remaining package dependencies to project.json
DNX and BuildTools now support all of the nuget v2 conventions that we depend on so we can
move all remaining nuget v2 packages to the project.json file and eliminate packages.config.

This change also adds "frameworks" to the project.json so that dnu restore can calculate
applicable assets.  I am not yet using "runtimes" in the project.json since we are still resolving
our runtime assets manually (eg: build tools copies known files from packages).  A future
change will move us to using our runtime packages and add runtimes sections to projects
as appropriate.


Commit migrated from https://github.com/dotnet/corefx/commit/eb35a304c7e89e8b4335ed13c5d23706360d49a4
2015-05-05 12:36:57 -07:00
Eric StJohn c0e430ddf5 Update to latest CoreFx packages, convert to project.json
This change updates all projects to the latest CoreFx packages which make use of nuget v3 features and thus require project.json.  Packages.config remains for the packages which are not yet compatible with the new build task (mainly because we need to resolve to PCL folders).
The entire change was done by a tool in order to not miss any dependencies, and ensure we have project items for the packages.config/project.json.  One side effect of using the tool is some reformatting of whitespace in the projects.


Commit migrated from https://github.com/dotnet/corefx/commit/e729c5353070b71aedff8f1300ae838573813faf
2015-04-15 12:47:43 -07:00
Matt Cohn d0bb690ea6 Update xunit dependency to xunit.core.netcore.1.0.1-prerelease
Update xunit dependency.  New package corrects its dependency on
xunit.abstractions to version 2.0.0-beta5-build2785.


Commit migrated from https://github.com/dotnet/corefx/commit/a50ce00294851a60b177f14785f1af9f50f5e344
2015-04-09 16:24:18 -07:00
Christopher Costa e61ebe344e Setting version number for System.Linq.Queryable broke System.Linq.Queryable tests because they started picking up libraries from the Gac instead of the locally built libraries.
[tfs-changeset: 1440343]


Commit migrated from https://github.com/dotnet/corefx/commit/582e2919da5bc92c0148a4f5b77b18821fa775ee
2015-03-26 13:52:13 -07:00
Christopher Costa 8bba87111e Convert projects to consume open sources instead of closed sources for open sourced libraries. Not converting System.Diagnostics.Debug even though it is open sourced because of the dependency System.Collections.Specialized (not yet converted) has on this project.
[tfs-changeset: 1439293]


Commit migrated from https://github.com/dotnet/corefx/commit/c7d17d9e7bd3a98fd5099f0bfb7cb68802decceb
2015-03-25 01:40:37 -07:00
Tarek Mahmoud Sayed b3120f73dd Remove checked in resources generated code file (SR.cs)
After this change it is no longer required to include the resources
generated code file SR.cs inside the project tree as such files
will get automatically generated in the intermediate folder


Commit migrated from https://github.com/dotnet/corefx/commit/e7513c213c16f5ca4bd35c6c4eace534b4d94ed5
2015-03-17 16:24:08 -07:00
dotnet-bot 5e4a3d7cce Add System.Linq.Queryable Source and Tests
Commit migrated from https://github.com/dotnet/corefx/commit/1a550b39d0dbf64f7ffb8f59951e748dc0382b62
2015-03-16 13:02:36 -07:00