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

Fix language detection handling #43493

Open
woodruffw opened this issue Jul 2, 2023 · 1 comment
Open

Fix language detection handling #43493

woodruffw opened this issue Jul 2, 2023 · 1 comment
Assignees
Labels
C:core Blight's core classes and interfaces enhancement New feature or request

Comments

@woodruffw
Copy link
Member

This has two parts:

  1. The "high level" bug is that inputs don't affect the Tool.lang correctly -- Tool.lang is determined only by the presence of an -x flag or the tool class itself, meaning that blight.CC.lang will always report Lang.C unless -x c++ is passed. This manifests particularly as the wrong lang value for assembly inputs: cc foo.s ought to report Lang.Asm (which doesn't exist yet), but reports Lang.C instead.
  2. The "low level" bug is that Tool.lang is a bad abstraction: a given tool invocation might be handling multiple languages at once, or no languages at all.

Long term, we should probably just kill off the Tool.lang API. Shorter term, we should try to make its behavior more intuitive (e.g. sniffing file suffixes when available, and presenting a Lang variant based on them).

@woodruffw woodruffw added enhancement New feature or request C:core Blight's core classes and interfaces labels Jul 2, 2023
@woodruffw woodruffw self-assigned this Jul 2, 2023
@woodruffw
Copy link
Member Author

#43495 would probably help with this but is much larger in scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:core Blight's core classes and interfaces enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant