This repository was archived by the owner on Dec 12, 2020. It is now read-only.
Commit dadd639
authored
Use McMaster.NETCore.Plugins for assembly loading (#156)
* Engine uses `McMaster.NETCore.Plugins` package to resolve assemblies and dependencies, enabling generators to reference additional dependencies! 🎉
* Tasks deprecate `GeneratorAssemblySearchPaths` usage
* Tasks use `CodeGenerationRoslynPlugin` ItemGroup instead, which contains
concrete assembly paths (instead of containing folder paths, as was previously)
* Engine targets `netcoreapp2.0` to reference McMaster package
* Tests use Amadevus.RecordGenerator NuGet generator for
back-compat checks
* Tests.Generators use Bogus NuGet for NuGet dependency resolution check
* `CodeGeneration.Roslyn.Plugin.Sdk` MSBuild project Sdk created, to help build and package plugins correctly.
* Migrate to use VS2019/.NET Core SDK v3.1
* Rewritten Readme with a simpler demo and more advanced scenarios
* Change input assemblies check
Now the list of plugin assemblies is always read
from response file (plugin list),
the last modified time is calculated using those assemblies,
and the .AssemblyList.txt file is not created.
Also separated reading the results into another target,
and set Inputs and Outputs so that the MSBuild can fully skip
executing the target that invokes CLI tool.
* Rename BuildTime targets private items
* add comment to BuildTime targets
* feature: create Plugin.Sdk project
initial idea in #113
* fix GenerateCodeFromAttributesCore condition
_CodeGenToolVersionExitCode was compared to zero
via != instead of ==
* fix CGR1002 warning in Tests
* refactor and cleanup BuildTime files
* refactor Tests project file
* docs: readme demo and more for new Plugins.Sdk
* don't prefer shared types, use explicit list
this will allow different plugins to have conflicting dependencies
* refactor: rename dictionary to cachedPlugins
* fix: Use OutputItemType in Sample
* docs: Add changelog for plugins PR1 parent 0641357 commit dadd639
19 files changed
Lines changed: 558 additions & 319 deletions
File tree
- samples/GeneratorInConsumerSolution/Sample.Consumer
- src
- CodeGeneration.Roslyn.BuildTime/build
- CodeGeneration.Roslyn.Engine
- CodeGeneration.Roslyn.Plugin.Sdk
- Sdk
- CodeGeneration.Roslyn.Tests.Generators
- CodeGeneration.Roslyn.Tests
- CodeGeneration.Roslyn.Tool
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
| 26 | + | |
20 | 27 | | |
| 28 | + | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
| |||
Large diffs are not rendered by default.
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 51 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
25 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
26 | 43 | | |
27 | 44 | | |
28 | 45 | | |
| |||
31 | 48 | | |
32 | 49 | | |
33 | 50 | | |
34 | | - | |
35 | | - | |
| 51 | + | |
| 52 | + | |
36 | 53 | | |
37 | 54 | | |
38 | 55 | | |
39 | 56 | | |
40 | 57 | | |
41 | 58 | | |
42 | 59 | | |
43 | | - | |
| 60 | + | |
44 | 61 | | |
45 | | - | |
46 | | - | |
| 62 | + | |
| 63 | + | |
47 | 64 | | |
48 | 65 | | |
49 | 66 | | |
| |||
52 | 69 | | |
53 | 70 | | |
54 | 71 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 72 | + | |
| 73 | + | |
60 | 74 | | |
61 | 75 | | |
62 | 76 | | |
63 | 77 | | |
64 | 78 | | |
65 | 79 | | |
66 | | - | |
67 | | - | |
| 80 | + | |
| 81 | + | |
68 | 82 | | |
69 | 83 | | |
70 | | - | |
| 84 | + | |
71 | 85 | | |
72 | | - | |
| 86 | + | |
73 | 87 | | |
74 | 88 | | |
75 | | - | |
76 | | - | |
| 89 | + | |
| 90 | + | |
77 | 91 | | |
78 | 92 | | |
79 | 93 | | |
80 | 94 | | |
81 | 95 | | |
82 | | - | |
83 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
84 | 107 | | |
85 | 108 | | |
86 | 109 | | |
87 | 110 | | |
88 | 111 | | |
89 | | - | |
| 112 | + | |
90 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
91 | 119 | | |
92 | 120 | | |
93 | 121 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
0 commit comments