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

windows path fixes2 #1311

Open
wants to merge 3 commits into
base: canary
Choose a base branch
from
Open

windows path fixes2 #1311

wants to merge 3 commits into from

Conversation

aaronvg
Copy link
Contributor

@aaronvg aaronvg commented Jan 10, 2025

  • Fix windows vscode client generation
  • Fix hover on windows

Important

Fixes Windows path handling and hover functionality in baml_project_manager.ts, with improved error logging.

  • Behavior:
    • Fixes Windows path handling in get_file() by using file_path.fsPath.
    • Corrects hover functionality on Windows by adjusting get_file() call in handleHoverRequest().
  • Error Handling:
    • Adds error logging for backup failures in runGeneratorsWithoutDebounce().
    • Logs errors when BAML client generation fails.
  • Misc:
    • Adds console logs for debugging directory existence and creation in runGeneratorsWithoutDebounce().

This description was created by Ellipsis for 2c0d80b. It will automatically update as commits are pushed.

Copy link

vercel bot commented Jan 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baml ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 10:13pm

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 7ec3759 in 23 seconds

More details
  • Looked at 88 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. typescript/vscode-ext/packages/language-server/src/lib/baml_project_manager.ts:215
  • Draft comment:
    The get_file method now correctly accepts a URI object and uses fsPath for file operations. Ensure all calls to this method pass a URI object, as done in handleHoverRequest.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The change from URI.file(match.uri).toString() to URI.file(match.uri) in the get_file method call is correct. However, the get_file method itself should be updated to accept a URI object instead of a string, which has already been done. This change ensures that the fsPath property is used correctly for file operations.
2. typescript/vscode-ext/packages/language-server/src/lib/baml_project_manager.ts:380
  • Draft comment:
    The change to use path.join(out_dir + '.tmp') and path.join(out_dir + '.bak') simplifies directory creation and is correct. Ensure that out_dir is correctly defined before these operations.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The change from path.join(path.dirname(g.output_dir), path.basename(g.output_dir) + '.tmp') to path.join(out_dir + '.tmp') simplifies the code and is correct. The same applies to the backup directory. This change ensures that the temporary and backup directories are correctly created next to the output directory.
3. typescript/vscode-ext/packages/language-server/src/lib/baml_project_manager.ts:427
  • Draft comment:
    The try-catch block around the rename operation for backing up the directory is a good addition for error handling and logging.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The try-catch block around the rename operation for backing up the directory is a good addition. It ensures that any errors during the backup process are logged, which aids in debugging and error handling.

Workflow ID: wflow_YxNUyBGmdwhSSMWZ


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 2c0d80b in 12 seconds

More details
  • Looked at 21 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. typescript/vscode-ext/packages/language-server/src/lib/baml_project_manager.ts:426
  • Draft comment:
    Fix indentation for better readability.
              await rename(out_dir, backupDir)
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The indentation issue is minor but should be corrected for consistency.

Workflow ID: wflow_WdGU9MjfxB9wQI4f


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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.

1 participant