Giter VIP home page Giter VIP logo

Comments (15)

jgillich avatar jgillich commented on May 27, 2024 9

In the meantime, I've published a fork with the fix from #99:

https://marketplace.visualstudio.com/items?itemName=jgillich.crystal-lang-fixed

from vscode-crystal-lang.

bcardiff avatar bcardiff commented on May 27, 2024 5

@faustinoaq Is there any progress in the scry server that can be published? Otherwise, it would be great to consider fixing this issue in the latest version since it's a papercut that many people with the constant-saving-file-behavior ✋will suffer.

I know little or nothing about developing vscode extensions. I'm not sure after a checkout which node/ts should be installed and how to run the working copy version of the extension. If you can point me on these topics I might be able to hack around.

Thanks!

from vscode-crystal-lang.

faustinoaq avatar faustinoaq commented on May 27, 2024 5

Hi @jgillich @baelter @rowland @paulcsmith @girng @bcardiff vscode-crystal-lang is updated now.

I can confirm, this error doesn't happen anymore, feel free to test it and report new issues 😄

image

image

from vscode-crystal-lang.

faustinoaq avatar faustinoaq commented on May 27, 2024 3

Still happens in 0.3.14 in rare cases with missing end. Could not boil it down to a minimal example though :/

yeah, This still happens when crystal tool format throws another message like a bug report or similar. I'm working on a new backend for this extension, with new features and less bugs. I hope to get it soon 👍

from vscode-crystal-lang.

paulcsmith avatar paulcsmith commented on May 27, 2024 2

I just placed a $50 bounty to help out with this issue. Would love to have it fixed if we can :D

https://www.bountysource.com/issues/69775273-whole-buffer-replaced-with-syntax-error

from vscode-crystal-lang.

baelter avatar baelter commented on May 27, 2024 1

Still happens in 0.3.14 in rare cases with missing end. Could not boil it down to a minimal example though :/

from vscode-crystal-lang.

faustinoaq avatar faustinoaq commented on May 27, 2024

Oh, I can confirm this bug, Thank you for report it 👍

from vscode-crystal-lang.

bcardiff avatar bcardiff commented on May 27, 2024

I also experienced this and was worried if it was on the formatter side or in the extension.

Also, when using a custom crystal build the first line in the buffer ends up being: Using compiled compiler at .build/crystal. Maybe is something to have in mind during the refactor. :-)

from vscode-crystal-lang.

faustinoaq avatar faustinoaq commented on May 27, 2024

Hi @bcardiff

Thank you for your comment.

Yeah, current Node.js backend has some pitfalls, currently I'm using experimental Scry server while working on a new backend for this extension, I need to sync my work with github, though 😅

I'm using this branch https://github.com/crystal-lang-tools/scry/tree/fa/work-in-progress

Also here is my currently working source code of scry:

scry.zip

SHA256: f8556f4b2816ecbb6c1e31c24b3740a91d055d3f9426b80310509c52de5bedb7

There is a bin/linux compatible with 64 bit linux systems, with the following linked libraries:

[main@pc bin]$ pwd
/home/main/Projects/scry/bin
[main@pc bin]$ ldd scry 
        linux-vdso.so.1 (0x00007ffd71ce3000)
        libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007fd14e6c3000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007fd14e53e000)
        libgc.so.1 => /usr/lib/libgc.so.1 (0x00007fd14e4d2000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fd14e4b1000)
        libevent-2.1.so.6 => /usr/lib/libevent-2.1.so.6 (0x00007fd14e459000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007fd14e44f000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fd14e448000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fd14e42e000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007fd14e26a000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fd14ec12000)
        libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007fd14df96000)

ezgif-3-8c99d4f1095f

My settings.json is:

{
    "crystal-lang.server": "/home/main/Projects/scry/bin/linux"
}

from vscode-crystal-lang.

faustinoaq avatar faustinoaq commented on May 27, 2024

Formatting feature inside Scry should work like a charm, 'cause it doesn't uses command line, so no warning messages or other formatting errors can be included in formatted code.

https://github.com/crystal-lang-tools/scry/blob/6a8ff983b0cb140b90be4f9992c007a3b86715a8/src/scry/formatter.cr#L16-L32

from vscode-crystal-lang.

rowland avatar rowland commented on May 27, 2024

This one keeps biting me. It's rather unnerving.

from vscode-crystal-lang.

girng avatar girng commented on May 27, 2024

LOL the first time this happened, my heart dropped. I was so happy ctrl+z worked, I think I would have cried :D. But yeah, this bug actually played a vital role in me creating backups. Which in the end, is a positive thing. Happy little bugs

from vscode-crystal-lang.

jgillich avatar jgillich commented on May 27, 2024

@faustinoaq Thoughts on #99? Can we get this in?

from vscode-crystal-lang.

RockManJoe64 avatar RockManJoe64 commented on May 27, 2024

Awesome work! Will this fix make it into the main fork of the Crystal plugin?

from vscode-crystal-lang.

bcardiff avatar bcardiff commented on May 27, 2024

@RockManJoe64 this fix is available in 0.4.0 released under https://marketplace.visualstudio.com/items?itemName=faustinoaq.crystal-lang

from vscode-crystal-lang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.