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

Adding file bypass option to TSP init and copy over Azure template from TypeSpecAzure #2014

Closed
wants to merge 4 commits into from

Conversation

allenjzhang
Copy link
Member

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

Changes in this PR will be published to the following url to try(check status of TypeSpec Pull Request Try It pipeline for publish status):
Playground: https://cadlplayground.z22.web.core.windows.net/prs/2014/

Website: https://cadlwebsite.z1.web.core.windows.net/prs/2014/

@@ -0,0 +1,69 @@
import "@typespec/http";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we still waiting on typespec-azure to be made public?

@@ -3,7 +3,7 @@ import { TypeSpecConfigJsonSchema } from "../config/config-schema.js";
import { TypeSpecRawConfig } from "../config/types.js";

export interface InitTemplateFile {
path: string;
path: string | boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hhm forgot it was an array of this object and not a map. This feels a little wrong to have that this way now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wondering if we should have instead a new property skip?: boolean and I think in the future it could be used to conditionally exclude the file from parameters as well

@@ -339,13 +339,20 @@ async function writeFiles(host: CompilerHost, config: ScaffoldingConfig) {
return;
}
for (const file of config.files) {
await writeFile(host, config, file);
if (file.path === false) {
await host.rm(file.destination);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this feels really hacky, it should skip the generation of those not create then delete

@allenjzhang
Copy link
Member Author

Closing this in favor of new PR #2121

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

Successfully merging this pull request may close these issues.

2 participants