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

"Redundant bracket" quickfix deletes first line of file #1183

Open
squarespirit opened this issue Dec 17, 2024 · 4 comments
Open

"Redundant bracket" quickfix deletes first line of file #1183

squarespirit opened this issue Dec 17, 2024 · 4 comments

Comments

@squarespirit
Copy link

Type: Bug

To reproduce:
Create a new file with

#!/usr/bin/env stack
-- stack script --snapshot lts-22.28

main = (putStrLn "Hello World")

Mouseover the redundant brackets > Quick fix > Apply hint: redundant bracket

Expected: the brackets get deleted
Actual: The first line of the file gets deleted also.

Extension version: 2.4.4
VS Code version: Code 1.96.0 (Universal) (138f619c86f1199955d53b4166bef66ef252935c, 2024-12-11T02:29:09.626Z)
OS version: Darwin arm64 23.3.0
Modes:

System Info
Item Value
CPUs Apple M3 Pro (11 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 4, 3, 3
Memory (System) 18.00GB (1.89GB free)
Process Argv --crash-reporter-id 865ffc34-d8f2-4754-b968-a881341d18fe
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupyter:31046869
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc2:31192216
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624

@jhrcek
Copy link

jhrcek commented Dec 17, 2024

FYI this is not really an issue with vscode-haskell - it more closely related to haskell-language-server, which contains hlint plugin, which in turn uses apply-refact library to apply automatic fixes to some hlint warnings.
The issue has been reported in apply-refact repo some time ago: mpickering/apply-refact#140

@fendor
Copy link
Collaborator

fendor commented Dec 17, 2024

Hi, thank you for bug report!

I think the same issue is reported at haskell/haskell-language-server#4143

@squarespirit
Copy link
Author

Thanks, didn't realize to check those repos.

@fendor
Copy link
Collaborator

fendor commented Dec 18, 2024

No worries!

I am closing this as a duplicate of haskell/haskell-language-server#4143, though. Feel free to reopen or open other issues if you think we've missed something!

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

No branches or pull requests

3 participants