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

new: Support raw templates for code generation. #982

Merged
merged 5 commits into from
Jul 25, 2023

Conversation

milesj
Copy link
Collaborator

@milesj milesj commented Jul 25, 2023

Raw files will not be rendered with Tera, and will be used as-is.

@github-actions
Copy link

github-actions bot commented Jul 25, 2023

Run report for 93d2cd44 (ubuntu-latest, 16)

Total time: 1m 22s | Comparison time: 2m 4s | Estimated savings: 41.6s (33.4% faster)

Action Time Status Info
🟩 SetupNodeTool(16.20.1) 4.4s Passed
🟩 SyncNodeProject(types) 768ms Passed
🟩 InstallNodeDeps(16.20.1) 1m 12s Passed
🟩 SyncNodeProject(runtime) 880ms Passed
🟦 RunTarget(types:build) 1.6s Cached
🟦 RunTarget(runtime:build) 1.3s Cached
🟩 SyncNodeProject(website) 1.3s Passed
🟩 SyncWorkspace 498.5ms Passed
🟦 RunTarget(website:build) 2.7s Cached
Environment

OS: Linux
Matrix:

os = ubuntu-latest
node-version = 16

Variables:

MOON_NODE_VERSION = 16.20.1
Touched files
crates/cli/src/commands/generate.rs
crates/cli/tests/generate_test.rs
crates/cli/tests/snapshots/generate_test__doesnt_generate_files_when_dryrun.snap
crates/cli/tests/snapshots/generate_test__generates_files_from_template.snap
crates/cli/tests/snapshots/generate_test__handles_raw_files-2.snap
crates/cli/tests/snapshots/generate_test__handles_raw_files.snap
crates/cli/tests/snapshots/generate_test__interpolates_destination_path.snap
crates/cli/tests/snapshots/generate_test__overwrites_existing_files_when_forced.snap
crates/cli/tests/snapshots/generate_test__overwrites_existing_files_when_interpolated_path.snap
crates/core/archive/tests/tree_differ_test.rs
nextgen/codegen/src/template.rs
nextgen/codegen/src/template_file.rs
nextgen/codegen/tests/__fixtures__/template/file.raw.txt
nextgen/codegen/tests/__fixtures__/template/file.txt
nextgen/codegen/tests/template_file_test.rs
nextgen/codegen/tests/template_test.rs
packages/cli/CHANGELOG.md
tests/fixtures/generator/templates/standard/file.txt
tests/fixtures/generator/templates/standard/other.raw.txt
website/docs/guides/codegen.mdx

@github-actions
Copy link

github-actions bot commented Jul 25, 2023

Run report for 93d2cd44 (ubuntu-latest, 20)

Total time: 1m 51s | Comparison time: 2m 37s | Estimated savings: 46.6s (29.5% faster)

Action Time Status Info
🟩 SetupNodeTool(20.5.0) 6.3s Passed
🟩 SyncNodeProject(types) 551.1ms Passed
🟩 InstallNodeDeps(20.5.0) 1m 38s Passed
🟩 SyncNodeProject(runtime) 646.5ms Passed
🟦 RunTarget(types:build) 1.4s Cached
🟦 RunTarget(runtime:build) 1.1s Cached
🟩 SyncNodeProject(website) 1.1s Passed
🟩 SyncWorkspace 725.8ms Passed
🟦 RunTarget(website:build) 3.7s Cached
Environment

OS: Linux
Matrix:

os = ubuntu-latest
node-version = 20

Variables:

MOON_NODE_VERSION = 20.5.0
Touched files
crates/cli/src/commands/generate.rs
crates/cli/tests/generate_test.rs
crates/cli/tests/snapshots/generate_test__doesnt_generate_files_when_dryrun.snap
crates/cli/tests/snapshots/generate_test__generates_files_from_template.snap
crates/cli/tests/snapshots/generate_test__handles_raw_files-2.snap
crates/cli/tests/snapshots/generate_test__handles_raw_files.snap
crates/cli/tests/snapshots/generate_test__interpolates_destination_path.snap
crates/cli/tests/snapshots/generate_test__overwrites_existing_files_when_forced.snap
crates/cli/tests/snapshots/generate_test__overwrites_existing_files_when_interpolated_path.snap
crates/core/archive/tests/tree_differ_test.rs
nextgen/codegen/src/template.rs
nextgen/codegen/src/template_file.rs
nextgen/codegen/tests/__fixtures__/template/file.raw.txt
nextgen/codegen/tests/__fixtures__/template/file.txt
nextgen/codegen/tests/template_file_test.rs
nextgen/codegen/tests/template_test.rs
packages/cli/CHANGELOG.md
tests/fixtures/generator/templates/standard/file.txt
tests/fixtures/generator/templates/standard/other.raw.txt
website/docs/guides/codegen.mdx

@github-actions
Copy link

github-actions bot commented Jul 25, 2023

Run report for 93d2cd44 (windows-latest, 20)

Total time: 2m 14s | Comparison time: 3m 12s | Estimated savings: 57.8s (30.0% faster)

Action Time Status Info
🟩 SetupNodeTool(20.5.0) 10s Passed
🟩 SyncNodeProject(types) 359.9ms Passed
🟩 InstallNodeDeps(20.5.0) 1m 56s Passed
🟩 SyncNodeProject(runtime) 400.2ms Passed
🟦 RunTarget(types:build) 1.4s Cached
🟦 RunTarget(runtime:build) 1.6s Cached
🟩 SyncNodeProject(website) 1.7s Passed
🟩 SyncWorkspace 334.4ms Passed
🟦 RunTarget(website:build) 4.6s Cached
Environment

OS: Windows
Matrix:

os = windows-latest
node-version = 20

Variables:

MOON_NODE_VERSION = 20.5.0
Touched files
crates/cli/src/commands/generate.rs
crates/cli/tests/generate_test.rs
crates/cli/tests/snapshots/generate_test__doesnt_generate_files_when_dryrun.snap
crates/cli/tests/snapshots/generate_test__generates_files_from_template.snap
crates/cli/tests/snapshots/generate_test__handles_raw_files-2.snap
crates/cli/tests/snapshots/generate_test__handles_raw_files.snap
crates/cli/tests/snapshots/generate_test__interpolates_destination_path.snap
crates/cli/tests/snapshots/generate_test__overwrites_existing_files_when_forced.snap
crates/cli/tests/snapshots/generate_test__overwrites_existing_files_when_interpolated_path.snap
crates/core/archive/tests/tree_differ_test.rs
nextgen/codegen/src/template.rs
nextgen/codegen/src/template_file.rs
nextgen/codegen/tests/__fixtures__/template/file.raw.txt
nextgen/codegen/tests/__fixtures__/template/file.txt
nextgen/codegen/tests/template_file_test.rs
nextgen/codegen/tests/template_test.rs
packages/cli/CHANGELOG.md
tests/fixtures/generator/templates/standard/file.txt
tests/fixtures/generator/templates/standard/other.raw.txt
website/docs/guides/codegen.mdx

@github-actions
Copy link

github-actions bot commented Jul 25, 2023

Run report for 93d2cd44 (ubuntu-latest, 18)

Total time: 1m 22s | Comparison time: 2m 6s | Estimated savings: 43.3s (34.3% faster)

Action Time Status Info
🟩 SetupNodeTool(18.17.0) 4.9s Passed
🟩 SyncNodeProject(types) 647.1ms Passed
🟩 InstallNodeDeps(18.17.0) 1m 11s Passed
🟩 SyncNodeProject(runtime) 859.8ms Passed
🟦 RunTarget(types:build) 1.6s Cached
🟦 RunTarget(runtime:build) 1.1s Cached
🟩 SyncNodeProject(website) 1.1s Passed
🟩 SyncWorkspace 618ms Passed
🟦 RunTarget(website:build) 3.2s Cached
Environment

OS: Linux
Matrix:

os = ubuntu-latest
node-version = 18

Variables:

MOON_NODE_VERSION = 18.17.0
Touched files
crates/cli/src/commands/generate.rs
crates/cli/tests/generate_test.rs
crates/cli/tests/snapshots/generate_test__doesnt_generate_files_when_dryrun.snap
crates/cli/tests/snapshots/generate_test__generates_files_from_template.snap
crates/cli/tests/snapshots/generate_test__handles_raw_files-2.snap
crates/cli/tests/snapshots/generate_test__handles_raw_files.snap
crates/cli/tests/snapshots/generate_test__interpolates_destination_path.snap
crates/cli/tests/snapshots/generate_test__overwrites_existing_files_when_forced.snap
crates/cli/tests/snapshots/generate_test__overwrites_existing_files_when_interpolated_path.snap
crates/core/archive/tests/tree_differ_test.rs
nextgen/codegen/src/template.rs
nextgen/codegen/src/template_file.rs
nextgen/codegen/tests/__fixtures__/template/file.raw.txt
nextgen/codegen/tests/__fixtures__/template/file.txt
nextgen/codegen/tests/template_file_test.rs
nextgen/codegen/tests/template_test.rs
packages/cli/CHANGELOG.md
tests/fixtures/generator/templates/standard/file.txt
tests/fixtures/generator/templates/standard/other.raw.txt
website/docs/guides/codegen.mdx

@github-actions
Copy link

github-actions bot commented Jul 25, 2023

Run report for 93d2cd44 (windows-latest, 18)

Total time: 1m 54s | Comparison time: 2m 40s | Estimated savings: 46.1s (28.8% faster)

Action Time Status Info
🟩 SetupNodeTool(18.17.0) 9.6s Passed
🟩 SyncNodeProject(types) 542.3ms Passed
🟩 InstallNodeDeps(18.17.0) 1m 37s Passed
🟩 SyncNodeProject(runtime) 686.7ms Passed
🟦 RunTarget(types:build) 1.6s Cached
🟦 RunTarget(runtime:build) 1.1s Cached
🟩 SyncNodeProject(website) 1.1s Passed
🟩 SyncWorkspace 638.6ms Passed
🟦 RunTarget(website:build) 3.5s Cached
Environment

OS: Windows
Matrix:

os = windows-latest
node-version = 18

Variables:

MOON_NODE_VERSION = 18.17.0
Touched files
crates/cli/src/commands/generate.rs
crates/cli/tests/generate_test.rs
crates/cli/tests/snapshots/generate_test__doesnt_generate_files_when_dryrun.snap
crates/cli/tests/snapshots/generate_test__generates_files_from_template.snap
crates/cli/tests/snapshots/generate_test__handles_raw_files-2.snap
crates/cli/tests/snapshots/generate_test__handles_raw_files.snap
crates/cli/tests/snapshots/generate_test__interpolates_destination_path.snap
crates/cli/tests/snapshots/generate_test__overwrites_existing_files_when_forced.snap
crates/cli/tests/snapshots/generate_test__overwrites_existing_files_when_interpolated_path.snap
crates/core/archive/tests/tree_differ_test.rs
nextgen/codegen/src/template.rs
nextgen/codegen/src/template_file.rs
nextgen/codegen/tests/__fixtures__/template/file.raw.txt
nextgen/codegen/tests/__fixtures__/template/file.txt
nextgen/codegen/tests/template_file_test.rs
nextgen/codegen/tests/template_test.rs
packages/cli/CHANGELOG.md
tests/fixtures/generator/templates/standard/file.txt
tests/fixtures/generator/templates/standard/other.raw.txt
website/docs/guides/codegen.mdx

@github-actions
Copy link

github-actions bot commented Jul 25, 2023

Run report for 93d2cd44 (windows-latest, 16)

Total time: 1m 53s | Comparison time: 2m 41s | Estimated savings: 47.4s (29.4% faster)

Action Time Status Info
🟩 SetupNodeTool(16.20.1) 8.3s Passed
🟩 SyncNodeProject(types) 362.4ms Passed
🟩 InstallNodeDeps(16.20.1) 1m 38s Passed
🟩 SyncNodeProject(runtime) 426.5ms Passed
🟦 RunTarget(types:build) 1.3s Cached
🟦 RunTarget(runtime:build) 1.1s Cached
🟩 SyncNodeProject(website) 1.1s Passed
🟩 SyncWorkspace 408.9ms Passed
🟦 RunTarget(website:build) 4s Cached
Environment

OS: Windows
Matrix:

os = windows-latest
node-version = 16

Variables:

MOON_NODE_VERSION = 16.20.1
Touched files
crates/cli/src/commands/generate.rs
crates/cli/tests/generate_test.rs
crates/cli/tests/snapshots/generate_test__doesnt_generate_files_when_dryrun.snap
crates/cli/tests/snapshots/generate_test__generates_files_from_template.snap
crates/cli/tests/snapshots/generate_test__handles_raw_files-2.snap
crates/cli/tests/snapshots/generate_test__handles_raw_files.snap
crates/cli/tests/snapshots/generate_test__interpolates_destination_path.snap
crates/cli/tests/snapshots/generate_test__overwrites_existing_files_when_forced.snap
crates/cli/tests/snapshots/generate_test__overwrites_existing_files_when_interpolated_path.snap
crates/core/archive/tests/tree_differ_test.rs
nextgen/codegen/src/template.rs
nextgen/codegen/src/template_file.rs
nextgen/codegen/tests/__fixtures__/template/file.raw.txt
nextgen/codegen/tests/__fixtures__/template/file.txt
nextgen/codegen/tests/template_file_test.rs
nextgen/codegen/tests/template_test.rs
packages/cli/CHANGELOG.md
tests/fixtures/generator/templates/standard/file.txt
tests/fixtures/generator/templates/standard/other.raw.txt
website/docs/guides/codegen.mdx

@milesj milesj merged commit fcada1c into develop-1.11 Jul 25, 2023
25 checks passed
@milesj milesj deleted the 1.11-raw-template branch July 25, 2023 21:17
milesj added a commit that referenced this pull request Jul 31, 2023
* Add raw to file.

* Add raw checks.

* Add more tests.

* Update docs.

* Fix paths.
milesj added a commit that referenced this pull request Jul 31, 2023
* Add raw to file.

* Add raw checks.

* Add more tests.

* Update docs.

* Fix paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant