question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"create module" assist fails to open created file

See original GitHub issue

When running the “create module” assist, I get the following prompt:

1 documents on disk would be loaded for change, confirm?
[Y]es, (N)o: 

No matter what I choose, I stay in the current file and get the following error:

2020-04-19T11:39:14.479 ERROR (pid:16623) [commands] - Error: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "/home/tf/Projects/rust/test-create-mod/src/foo.rs", query: "", fragment: ""}
    at _validateUri (/home/tf/.local/share/nvim/plugged/coc.nvim/build/index.js:21303:19)
    at _URI.URI (/home/tf/.local/share/nvim/plugged/coc.nvim/build/index.js:21405:13)
    at new _URI (/home/tf/.local/share/nvim/plugged/coc.nvim/build/index.js:21607:47)
    at Function.URI.parse (/home/tf/.local/share/nvim/plugged/coc.nvim/build/index.js:21517:16)
    at Workspace.getDocument (/home/tf/.local/share/nvim/plugged/coc.nvim/build/index.js:24569:32)
    at Workspace.readFile (/home/tf/.local/share/nvim/plugged/coc.nvim/build/index.js:24868:29)
    at Object.applySourceChange (/home/tf/.local/share/nvim/plugged/coc-rust-analyzer/lib/index.js:5553:36)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async /home/tf/.local/share/nvim/plugged/coc-rust-analyzer/lib/index.js:227:9

I didn’t manage to add logging here, so I’m not sure if this is a bug in coc-rust-analyzer, coc.nvim or my config.

Do you know if it’s possible to disable the 1 documents on disk would be loaded for change, confirm? prompt?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fannheywardcommented, Apr 20, 2020

Thanks for your report, I’ve fixed the url. But jump will not works currently https://github.com/neoclide/coc.nvim/pull/1796

0reactions
JeanMertzcommented, Mar 16, 2021

Could this still (or again) be an issue?

When I hover over a mod mymod {}, do :CodeAction and select Extract module to file, two things happen:

  1. I get a pop-up asking “1 documents on disk would be loaded for change, confirm? (y/n)?”
  2. If I press y, the file src/mymod.rs is created.

Nothing else happens. The src/mymod.rs file remains empty, and the current inline module isn’t removed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

open() in Python does not create a file if it doesn't exist
So, the problem is with open cannot create a file before the target directory exists. We need to create it and then w...
Read more >
DOORS module fails to open in exclusive edit mode ... - IBM
Attempts to open a module exclusive edit in IBM Rational DOORS result in the error "DOORS report Unable to open module '/A Project/Requirements' ......
Read more >
How to fix "The following module is missing from the file ...
The main reason this error shows up is because a disabled module is removed from the file system without uninstalling it before. But...
Read more >
6. Modules — Python 3.11.1 documentation
This means that scripts in that directory will be loaded instead of modules of the same name in the library directory. This is...
Read more >
How To Work with Files using the fs Module in Node.js
In this article, you will use the fs module to read a file created via the command line, create and write to a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found