Commit bb9a135
authored
Fix command plugin when run on targets with dependencies (#801)
### Motivation
The command plugin is used for ahead-of-time (AOT) code generation. It
can be run with `--target`, or without, in which case it considers all
targets based on the presence of the requisite OpenAPI document and
config file.
If a target is detected that doesn't have either of these files, it
should be considered an error if that target was explicitly asked for
using `--target`. If it wasn't—either because we're looking at all
targets, or because it is a dependency—it should be skipped.
### Modifications
- Extend integration test to repro issue for AOT targets with
dependencies
- Skip targets that have no requisite files for generation unless they
were asked for
### Result
Fixes command plugin when used for AOT generation with targets with
target dependencies.
### Test Plan
This PR starts out with a commit that updated the integration test to
repro the issue, which we should see fail in CI. Only then was a commit
added to address the issue, restoring the CI to green.1 parent 576e620 commit bb9a135
File tree
11 files changed
+51
-8
lines changed- IntegrationTest
- Sources
- Empty
- TypesAOTWithDependency
- TypesAOT
- Plugins/OpenAPIGeneratorCommand
- scripts
11 files changed
+51
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
54 | 61 | | |
55 | 62 | | |
Whitespace-only changes.
Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
| 84 | + | |
86 | 85 | | |
87 | 86 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
94 | 101 | | |
95 | 102 | | |
96 | 103 | | |
| |||
0 commit comments