Code Monkey home page Code Monkey logo

Comments (6)

faustinoaq avatar faustinoaq commented on May 28, 2024

@laginha87 I'm trying to solve this issue, but I can't figure out why is this still happening, Do you have some idea? 😅

Received message which is neither a response nor a notification message:
{
    "jsonrpc": "2.0",
    "error": {
        "code": -32001,
        "message": "Error reading file: Is a directory",
        "data": [
            "/usr/lib/crystal/io/file_descriptor.cr:53:9 in 'unbuffered_read'",
            "/usr/lib/crystal/io/buffered.cr:206:5 in 'fill_buffer'",
            "/usr/lib/crystal/io/buffered.cr:82:7 in 'peek'",
            "/usr/lib/crystal/io.cr:638:37 in 'gets'",
            "/usr/lib/crystal/io.cr:611:5 in 'gets'",
            "/usr/lib/crystal/io.cr:581:5 in 'gets'",
            "/usr/lib/crystal/io.cr:580:3 in 'gets'",
            "/usr/lib/crystal/io.cr:1167:7 in 'next'",
            "/usr/lib/crystal/iterator.cr:913:9 in 'next'",
            "/usr/lib/crystal/enumerable.cr:390:15 in 'join'",
            "/usr/lib/crystal/enumerable.cr:620:7 in 'join'",
            "/home/main/Projects/scry/src/scry/completion_resolver.cr:11:9 in 'run'",
            "/home/main/Projects/scry/src/scry/context.cr:115:19 in 'dispatch_request'",
            "/home/main/Projects/scry/src/scry/context.cr:27:7 in 'dispatch'",
            "/home/main/Projects/scry/src/scry.cr:22:18 in 'start'",
            "/home/main/Projects/scry/src/scry.cr:38:1 in '__crystal_main'",
            "/usr/lib/crystal/crystal/main.cr:11:3 in '_crystal_main'",
            "/usr/lib/crystal/crystal/main.cr:112:5 in 'main_user_code'",
            "/usr/lib/crystal/crystal/main.cr:101:7 in 'main'",
            "/usr/lib/crystal/crystal/main.cr:135:3 in 'main'",
            "__libc_start_main",
            "_start",
            "???"
        ]
    }
}

from scry.

laginha87 avatar laginha87 commented on May 28, 2024

when does this happen, is it when you open the workspace or a specific file ?
Two sections where this might happen are:

def self.generate(paths)

and here

def resolve_path(required_file, file_dir)

from scry.

faustinoaq avatar faustinoaq commented on May 28, 2024

is it when you open the workspace or a specific file ?

@laginha87 Not a specific file, but any file inside src directory.

Code Completions works fine, though, this error is a bit annoying 😅 (fill up my logs)

Maybe this error is caused by some dir inside lib or crystal path, WDYT?

from scry.

faustinoaq avatar faustinoaq commented on May 28, 2024

I think we can try to check if file is actually a file? before analyzing it 😅

Ref: File.file?

from scry.

laginha87 avatar laginha87 commented on May 28, 2024

can you check if adding that check here

File.each_line(file_path).reduce([] of String) do |acc, line|
fixes the issue ?

from scry.

faustinoaq avatar faustinoaq commented on May 28, 2024

can you check if adding that check here fixes the issue ?

No, it don't

is it when you open the workspace or a specific file ?

I was wrong, this only happens when I have a file and a directory with similar name, like this:

screenshot_20180519_115650

😅

from scry.

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.