Skip to content

Attributes not included in reanalyze locations #991

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

Closed
zth opened this issue May 27, 2024 · 2 comments
Closed

Attributes not included in reanalyze locations #991

zth opened this issue May 27, 2024 · 2 comments

Comments

@zth
Copy link
Collaborator

zth commented May 27, 2024

cc @cristianoc

Example:

  1. Create a @react.component that's unused
  2. Start the code analyzer
  3. Run the new code action for removing the unused code (available in the pre-release extension)
  4. Everything but @react.component is removed
cristianoc added a commit to rescript-lang/rescript that referenced this issue May 29, 2024
The location of let bindings did not include annotations attached to the binding (for the first binding in a sequence).

This would show up in actions for dead code elimination in the editor tooling, which would remove everything but the annotation: rescript-lang/rescript-vscode#991
cristianoc added a commit to rescript-lang/rescript that referenced this issue May 29, 2024
The location of let bindings did not include annotations attached to the binding (for the first binding in a sequence).

This would show up in actions for dead code elimination in the editor tooling, which would remove everything but the annotation: rescript-lang/rescript-vscode#991
@cristianoc
Copy link
Collaborator

This happens to be due to an issue in the parser: rescript-lang/rescript#6791

cristianoc added a commit to rescript-lang/rescript that referenced this issue May 29, 2024
The location of let bindings did not include annotations attached to the binding (for the first binding in a sequence).

This would show up in actions for dead code elimination in the editor tooling, which would remove everything but the annotation: rescript-lang/rescript-vscode#991
@cristianoc
Copy link
Collaborator

Fixed in compiler master.

cknitt pushed a commit to rescript-lang/rescript that referenced this issue Jun 15, 2024
The location of let bindings did not include annotations attached to the binding (for the first binding in a sequence).

This would show up in actions for dead code elimination in the editor tooling, which would remove everything but the annotation: rescript-lang/rescript-vscode#991
cknitt pushed a commit to rescript-lang/rescript that referenced this issue Jun 16, 2024
The location of let bindings did not include annotations attached to the binding (for the first binding in a sequence).

This would show up in actions for dead code elimination in the editor tooling, which would remove everything but the annotation: rescript-lang/rescript-vscode#991
cknitt pushed a commit to rescript-lang/rescript that referenced this issue Jun 16, 2024
The location of let bindings did not include annotations attached to the binding (for the first binding in a sequence).

This would show up in actions for dead code elimination in the editor tooling, which would remove everything but the annotation: rescript-lang/rescript-vscode#991
cknitt pushed a commit to rescript-lang/rescript that referenced this issue Jun 16, 2024
The location of let bindings did not include annotations attached to the binding (for the first binding in a sequence).

This would show up in actions for dead code elimination in the editor tooling, which would remove everything but the annotation: rescript-lang/rescript-vscode#991
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants