Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define @net//:StandardReferences #82

Merged
merged 2 commits into from
Oct 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions csharp/private/actions/assembly.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def AssemblyAction(
args.add("/pdb:" + pdb.path)

# assembly references
(refs, runfiles) = collect_transitive_info(deps, target_framework)
(refs, runfiles, native_dlls) = collect_transitive_info(deps, target_framework)
args.add_all(refs, map_each = _format_ref_arg)

# analyzers
Expand Down Expand Up @@ -165,7 +165,7 @@ def AssemblyAction(
progress_message = "Compiling " + name,
inputs = depset(
direct = direct_inputs,
transitive = [refs],
transitive = [refs] + [native_dlls],
),
outputs = [out_file, refout, pdb],
executable = toolchain.runtime,
Expand All @@ -183,6 +183,7 @@ def AssemblyAction(
out = out_file,
refout = refout,
pdb = pdb,
native_dlls = native_dlls,
deps = deps,
transitive_refs = refs,
transitive_runfiles = runfiles,
Expand Down
6 changes: 5 additions & 1 deletion csharp/private/common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def collect_transitive_info(deps, tfm):
transitive_refs = []
direct_runfiles = []
transitive_runfiles = []
native_dlls = []

provider = CSharpAssembly[tfm]

Expand All @@ -44,10 +45,12 @@ def collect_transitive_info(deps, tfm):
direct_runfiles.append(assembly.pdb)

transitive_runfiles.append(assembly.transitive_runfiles)
native_dlls.append(assembly.native_dlls)

return (
depset(direct = direct_refs, transitive = transitive_refs),
depset(direct = direct_runfiles, transitive = transitive_runfiles),
depset(transitive = native_dlls),
)

def _get_provided_by_netstandard(providerInfo):
Expand Down Expand Up @@ -80,11 +83,12 @@ def fill_in_missing_frameworks(providers):
# newer netstandard will be preferred, if applicable
for (base, compatible_tfm) in sorted([(providers[compatible_tfm], compatible_tfm) for compatible_tfm in FrameworkCompatibility[tfm] if compatible_tfm in providers], key=_get_provided_by_netstandard):
# Copy the output from the compatible tfm, re-resolving the deps
(refs, runfiles) = collect_transitive_info(base.deps, tfm)
(refs, runfiles, native_dlls) = collect_transitive_info(base.deps, tfm)
providers[tfm] = CSharpAssembly[tfm](
out = base.out,
refout = base.refout,
pdb = base.pdb,
native_dlls = native_dlls,
deps = base.deps,
transitive_refs = refs,
transitive_runfiles = runfiles,
Expand Down
18 changes: 17 additions & 1 deletion csharp/private/frameworks/net20.BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
# This file was generated by build\src\D2L.Build.BazelGenerator\FrameworkBuildGenerator\GenerateFrameworkBuildFile.cs
# Don't edit it by hand! You should regenerate this if the .NET package gets updated.

load("@d2l_rules_csharp//csharp:defs.bzl", "import_library")
load("@d2l_rules_csharp//csharp:defs.bzl", "import_library", "csharp_library_set")

csharp_library_set(
name = "StandardReferences",
target_framework = "net20",
deps = [
"//:mscorlib",
"//:System",
"//:System.Data",
"//:System.Drawing",
"//:System.Xml",
],
visibility = ["@net//:__pkg__"],
)

import_library(
name = "Accessibility",
Expand Down Expand Up @@ -453,6 +466,9 @@ import_library(
name = "System.EnterpriseServices-noncyclic",
target_framework = "net20",
refdll = "//:build/.NETFramework/v2.0/System.EnterpriseServices.dll",
native_dlls = [
"//:build/.NETFramework/v2.0/System.EnterpriseServices.Wrapper.dll",
],
deps = [
"//:Microsoft.VisualC",
"//:mscorlib",
Expand Down
22 changes: 21 additions & 1 deletion csharp/private/frameworks/net40.BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
# This file was generated by build\src\D2L.Build.BazelGenerator\FrameworkBuildGenerator\GenerateFrameworkBuildFile.cs
# Don't edit it by hand! You should regenerate this if the .NET package gets updated.

load("@d2l_rules_csharp//csharp:defs.bzl", "import_library")
load("@d2l_rules_csharp//csharp:defs.bzl", "import_library", "csharp_library_set")

csharp_library_set(
name = "StandardReferences",
target_framework = "net40",
deps = [
"//:mscorlib",
"//:System",
"//:System.Core",
"//:System.Data",
"//:System.Drawing",
"//:System.Numerics",
"//:System.Runtime.Serialization",
"//:System.Xml",
"//:System.Xml.Linq",
],
visibility = ["@net//:__pkg__"]
)

import_library(
name = "Accessibility",
Expand Down Expand Up @@ -869,6 +886,9 @@ import_library(
name = "System.EnterpriseServices-noncyclic",
target_framework = "net40",
refdll = "//:build/.NETFramework/v4.0/System.EnterpriseServices.dll",
native_dlls = [
"//:build/.NETFramework/v4.0/System.EnterpriseServices.Wrapper.dll",
],
deps = [
"//:Microsoft.VisualC",
"//:mscorlib",
Expand Down
23 changes: 22 additions & 1 deletion csharp/private/frameworks/net45.BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# This file was generated by build\src\D2L.Build.BazelGenerator\FrameworkBuildGenerator\GenerateFrameworkBuildFile.cs
# Don't edit it by hand! You should regenerate this if the .NET package gets updated.

load("@d2l_rules_csharp//csharp:defs.bzl", "import_library")
load("@d2l_rules_csharp//csharp:defs.bzl", "import_library", "csharp_library_set")

csharp_library_set(
name = "StandardReferences",
target_framework = "net45",
deps = [
"//:mscorlib",
"//:System",
"//:System.Core",
"//:System.Data",
"//:System.Drawing",
"//:System.IO.Compression.FileSystem",
"//:System.Numerics",
"//:System.Runtime.Serialization",
"//:System.Xml",
"//:System.Xml.Linq",
],
visibility = ["@net//:__pkg__"],
)

import_library(
name = "Accessibility",
Expand Down Expand Up @@ -1032,6 +1050,9 @@ import_library(
name = "System.EnterpriseServices-noncyclic",
target_framework = "net45",
refdll = "//:build/.NETFramework/v4.5/System.EnterpriseServices.dll",
native_dlls = [
"//:build/.NETFramework/v4.5/System.EnterpriseServices.Wrapper.dll",
],
deps = [
"//:mscorlib",
"//:System",
Expand Down
23 changes: 22 additions & 1 deletion csharp/private/frameworks/net451.BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# This file was generated by build\src\D2L.Build.BazelGenerator\FrameworkBuildGenerator\GenerateFrameworkBuildFile.cs
# Don't edit it by hand! You should regenerate this if the .NET package gets updated.

load("@d2l_rules_csharp//csharp:defs.bzl", "import_library")
load("@d2l_rules_csharp//csharp:defs.bzl", "import_library", "csharp_library_set")

csharp_library_set(
name = "StandardReferences",
target_framework = "net451",
deps = [
"//:mscorlib",
"//:System",
"//:System.Core",
"//:System.Data",
"//:System.Drawing",
"//:System.IO.Compression.FileSystem",
"//:System.Numerics",
"//:System.Runtime.Serialization",
"//:System.Xml",
"//:System.Xml.Linq",
],
visibility = ["@net//:__pkg__"],
)

import_library(
name = "Accessibility",
Expand Down Expand Up @@ -1033,6 +1051,9 @@ import_library(
name = "System.EnterpriseServices-noncyclic",
target_framework = "net451",
refdll = "//:build/.NETFramework/v4.5.1/System.EnterpriseServices.dll",
native_dlls = [
"//:build/.NETFramework/v4.5.1/System.EnterpriseServices.Wrapper.dll",
],
deps = [
"//:mscorlib",
"//:System",
Expand Down
23 changes: 22 additions & 1 deletion csharp/private/frameworks/net452.BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# This file was generated by build\src\D2L.Build.BazelGenerator\FrameworkBuildGenerator\GenerateFrameworkBuildFile.cs
# Don't edit it by hand! You should regenerate this if the .NET package gets updated.

load("@d2l_rules_csharp//csharp:defs.bzl", "import_library")
load("@d2l_rules_csharp//csharp:defs.bzl", "import_library", "csharp_library_set")

csharp_library_set(
name = "StandardReferences",
target_framework = "net452",
deps = [
"//:mscorlib",
"//:System",
"//:System.Core",
"//:System.Data",
"//:System.Drawing",
"//:System.IO.Compression.FileSystem",
"//:System.Numerics",
"//:System.Runtime.Serialization",
"//:System.Xml",
"//:System.Xml.Linq",
],
visibility = ["@net//:__pkg__"],
)

import_library(
name = "Accessibility",
Expand Down Expand Up @@ -1034,6 +1052,9 @@ import_library(
name = "System.EnterpriseServices-noncyclic",
target_framework = "net452",
refdll = "//:build/.NETFramework/v4.5.2/System.EnterpriseServices.dll",
native_dlls = [
"//:build/.NETFramework/v4.5.2/System.EnterpriseServices.Wrapper.dll",
],
deps = [
"//:mscorlib",
"//:System",
Expand Down
23 changes: 22 additions & 1 deletion csharp/private/frameworks/net46.BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# This file was generated by build\src\D2L.Build.BazelGenerator\FrameworkBuildGenerator\GenerateFrameworkBuildFile.cs
# Don't edit it by hand! You should regenerate this if the .NET package gets updated.

load("@d2l_rules_csharp//csharp:defs.bzl", "import_library")
load("@d2l_rules_csharp//csharp:defs.bzl", "import_library", "csharp_library_set")

csharp_library_set(
name = "StandardReferences",
target_framework = "net46",
deps = [
"//:mscorlib",
"//:System",
"//:System.Core",
"//:System.Data",
"//:System.Drawing",
"//:System.IO.Compression.FileSystem",
"//:System.Numerics",
"//:System.Runtime.Serialization",
"//:System.Xml",
"//:System.Xml.Linq",
],
visibility = ["@net//:__pkg__"],
)

import_library(
name = "Accessibility",
Expand Down Expand Up @@ -1053,6 +1071,9 @@ import_library(
name = "System.EnterpriseServices-noncyclic",
target_framework = "net46",
refdll = "//:build/.NETFramework/v4.6/System.EnterpriseServices.dll",
native_dlls = [
"//:build/.NETFramework/v4.6/System.EnterpriseServices.Wrapper.dll",
],
deps = [
"//:mscorlib",
"//:System",
Expand Down
23 changes: 22 additions & 1 deletion csharp/private/frameworks/net461.BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# This file was generated by build\src\D2L.Build.BazelGenerator\FrameworkBuildGenerator\GenerateFrameworkBuildFile.cs
# Don't edit it by hand! You should regenerate this if the .NET package gets updated.

load("@d2l_rules_csharp//csharp:defs.bzl", "import_library")
load("@d2l_rules_csharp//csharp:defs.bzl", "import_library", "csharp_library_set")

csharp_library_set(
name = "StandardReferences",
target_framework = "net461",
deps = [
"//:mscorlib",
"//:System",
"//:System.Core",
"//:System.Data",
"//:System.Drawing",
"//:System.IO.Compression.FileSystem",
"//:System.Numerics",
"//:System.Runtime.Serialization",
"//:System.Xml",
"//:System.Xml.Linq",
],
visibility = ["@net//:__pkg__"],
)

import_library(
name = "Accessibility",
Expand Down Expand Up @@ -1054,6 +1072,9 @@ import_library(
name = "System.EnterpriseServices-noncyclic",
target_framework = "net461",
refdll = "//:build/.NETFramework/v4.6.1/System.EnterpriseServices.dll",
native_dlls = [
"//:build/.NETFramework/v4.6.1/System.EnterpriseServices.Wrapper.dll",
],
deps = [
"//:mscorlib",
"//:System",
Expand Down
23 changes: 22 additions & 1 deletion csharp/private/frameworks/net462.BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# This file was generated by build\src\D2L.Build.BazelGenerator\FrameworkBuildGenerator\GenerateFrameworkBuildFile.cs
# Don't edit it by hand! You should regenerate this if the .NET package gets updated.

load("@d2l_rules_csharp//csharp:defs.bzl", "import_library")
load("@d2l_rules_csharp//csharp:defs.bzl", "import_library", "csharp_library_set")

csharp_library_set(
name = "StandardReferences",
target_framework = "net462",
deps = [
"//:mscorlib",
"//:System",
"//:System.Core",
"//:System.Data",
"//:System.Drawing",
"//:System.IO.Compression.FileSystem",
"//:System.Numerics",
"//:System.Runtime.Serialization",
"//:System.Xml",
"//:System.Xml.Linq",
],
visibility = ["@net//:__pkg__"],
)

import_library(
name = "Accessibility",
Expand Down Expand Up @@ -1055,6 +1073,9 @@ import_library(
name = "System.EnterpriseServices-noncyclic",
target_framework = "net462",
refdll = "//:build/.NETFramework/v4.6.2/System.EnterpriseServices.dll",
native_dlls = [
"//:build/.NETFramework/v4.6.2/System.EnterpriseServices.Wrapper.dll",
],
deps = [
"//:mscorlib",
"//:System",
Expand Down
23 changes: 22 additions & 1 deletion csharp/private/frameworks/net47.BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# This file was generated by build\src\D2L.Build.BazelGenerator\FrameworkBuildGenerator\GenerateFrameworkBuildFile.cs
# Don't edit it by hand! You should regenerate this if the .NET package gets updated.

load("@d2l_rules_csharp//csharp:defs.bzl", "import_library")
load("@d2l_rules_csharp//csharp:defs.bzl", "import_library", "csharp_library_set")

csharp_library_set(
name = "StandardReferences",
target_framework = "net47",
deps = [
"//:mscorlib",
"//:System",
"//:System.Core",
"//:System.Data",
"//:System.Drawing",
"//:System.IO.Compression.FileSystem",
"//:System.Numerics",
"//:System.Runtime.Serialization",
"//:System.Xml",
"//:System.Xml.Linq",
],
visibility = ["@net//:__pkg__"],
)

import_library(
name = "Accessibility",
Expand Down Expand Up @@ -1055,6 +1073,9 @@ import_library(
name = "System.EnterpriseServices-noncyclic",
target_framework = "net47",
refdll = "//:build/.NETFramework/v4.7/System.EnterpriseServices.dll",
native_dlls = [
"//:build/.NETFramework/v4.7/System.EnterpriseServices.Wrapper.dll",
],
deps = [
"//:mscorlib",
"//:System",
Expand Down
Loading