bazel-contrib / bazel-contrib/vscode-bazel

Non-ASCII target names are interpreted incorrectly

Open
#206 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
296
Forks
108
Avg merge
3d 22h
Merged PRs (30d)
5

Description

Target names encoded in UTF-8 are decoded using Windows-1252. This is shown in the CodeLens and in the "Bazel Build Targets" window. Using either of these interfaces to start a bazel build fails because it uses the wrongly-encoded string in the command.
![image](https://user-images.githubusercontent.com/16628713/85880739-c454ea00-b799-11ea-8b50-586d104fbd30.png)
![image](https://user-images.githubusercontent.com/16628713/85880772-d2a30600-b799-11ea-94f1-4defc36c5fe6.png)
![image](https://user-images.githubusercontent.com/16628713/85881112-5b21a680-b79a-11ea-8256-3a1562d0f5c2.png)

Contributor guide

Open the contributing guide

Research direction

Start by tracing how target names are decoded and passed to the CodeLens and "Bazel Build Targets" window, then follow how either interface constructs the Bazel build command. Reproduce the problem with a UTF-8 target name and verify that both displays and the resulting command preserve the original name.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
build-system, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.