Skip to content

Commit

Permalink
Showing 13 changed files with 591 additions and 8 deletions.
4 changes: 4 additions & 0 deletions _examples/embedding/subdir/cfgdir/generate_in_gendir.yml
Original file line number Diff line number Diff line change
@@ -7,6 +7,10 @@ exec:
filename: gendir/generated.go
package: gendir

federation:
filename: gendir/federation_gen.go
package: gendir

model:
filename: gendir/model.go
package: gendir
4 changes: 4 additions & 0 deletions _examples/embedding/subdir/cfgdir/generate_in_subdir.yml
Original file line number Diff line number Diff line change
@@ -7,6 +7,10 @@ exec:
dir: .
package: subdir

federation:
filename: federation_gen.go
package: subdir

model:
filename: model.go
package: subdir
57 changes: 57 additions & 0 deletions _examples/embedding/subdir/directives.generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

115 changes: 115 additions & 0 deletions _examples/embedding/subdir/entity.generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions _examples/embedding/subdir/federation_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions _examples/embedding/subdir/gendir/federation_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

212 changes: 209 additions & 3 deletions _examples/embedding/subdir/gendir/generated.go
3 changes: 3 additions & 0 deletions _examples/embedding/subdir/gendir/model.go
3 changes: 3 additions & 0 deletions _examples/embedding/subdir/model.go
10 changes: 10 additions & 0 deletions _examples/embedding/subdir/prelude.generated.go
72 changes: 72 additions & 0 deletions _examples/embedding/subdir/root.generated.go
45 changes: 42 additions & 3 deletions _examples/embedding/subdir/root_.generated.go
4 changes: 2 additions & 2 deletions codegen/data.go
Original file line number Diff line number Diff line change
@@ -180,11 +180,11 @@ func BuildData(cfg *config.Config) (*Data, error) {
sourcePath := filepath.Join(wd, s.Name)
relative, err := filepath.Rel(outputDir, sourcePath)
if err != nil {
return nil, fmt.Errorf("failed to compute path of %s relative to %s: %w"+sourcePath, outputDir, err)
return nil, fmt.Errorf("failed to compute path of %s relative to %s: %w", sourcePath, outputDir, err)
}
relative = filepath.ToSlash(relative)
embeddable := true
if strings.HasPrefix(relative, "..") {
if strings.HasPrefix(relative, "..") || s.BuiltIn {
embeddable = false
}
aSources = append(aSources, AugmentedSource{

0 comments on commit 5f5bfcb

Please sign in to comment.