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

[WIP] Import typespec project into a single file #4383

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Sep 10, 2024

image image

Imported
image

  • Tests
  • Decide if a separate package is the right approach
  • Decide on the names

@azure-sdk
Copy link
Collaborator

azure-sdk commented Sep 10, 2024

❌ There is undocummented changes. Run chronus add to add a changeset or click here.

The following packages have changes but are not documented.

  • @typespec/compiler
  • @typespec/playground
Show changes

Copy link
Member Author

Choose a reason for hiding this comment

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

Does this make sense as a separate package and cli?

Copy link
Member Author

Choose a reason for hiding this comment

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

remove

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

@@ -109,10 +109,6 @@ export async function resolveModule(
const { baseDir } = options;
const absoluteStart = baseDir === "" ? "." : await realpath(resolvePath(baseDir));

if (!(await isDirectory(host, absoluteStart))) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not possible to check with urls and doesn't bring too much values apart from figuring out you passed the wrong value when developping.

@@ -1975,7 +1975,10 @@ function printItemList<T extends Node>(
* @param options Prettier options
* @returns Raw text in the file for the given node.
*/
function getRawText(node: TextRange, options: TypeSpecPrettierOptions) {
function getRawText(node: TextRange, options: TypeSpecPrettierOptions): string {
if ("rawText" in node) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Added this way of setting the syntax for basic nodes where they can have rawText instead of relying on the pos and end and the whole file making writing tsp from an AST impossible

@microsoft-github-policy-service microsoft-github-policy-service bot added the stale Mark a PR that hasn't been recently updated and will be closed. label Nov 21, 2024
Copy link
Contributor

Hi @timotheeguerin. Your PR has had no update for 30 days and it is marked as a stale PR. If it is not updated within 30 days, the PR will automatically be closed. If you want to refresh the PR, please remove the stale label.

1 similar comment
Copy link
Contributor

Hi @timotheeguerin. Your PR has had no update for 30 days and it is marked as a stale PR. If it is not updated within 30 days, the PR will automatically be closed. If you want to refresh the PR, please remove the stale label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Mark a PR that hasn't been recently updated and will be closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants