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

Error when a D project is opened as the root #39

Closed
aminya opened this issue Feb 24, 2021 · 14 comments
Closed

Error when a D project is opened as the root #39

aminya opened this issue Feb 24, 2021 · 14 comments
Labels

Comments

@aminya
Copy link
Member

aminya commented Feb 24, 2021

If you open this repo, fixtures is a sub-folder and it works, but if you open a D project as the root of the project it errors for strange reasons.

stderr 2021-02-24T14:42:44.733 [trace] source\served\extension.d:773:doStartup Started files provider for root RootSuggestion("C:\\Users\\aminy\\Documents\\GitHub\\JavaScript\\atom-ide-d\\spec\\fixtures\\", true)


source\served\extension.d:697:doStartup Initializing instance for root RootSuggestion("C:\\Users\\aminy\\Documents\\GitHub\\JavaScript\\atom-ide-d\\spec\\fixtures", true)


object.Exception@..\..\..\..\AppData\Local\dub\packages\workspace-d-3.6.0-pre.8\workspace-d\source\workspaced\backend.d(564): Instance with cwd 'C:\\Users\\aminy\\Documents\\GitHub\\JavaScript\\atom-ide-d\\spec\\fixtures' already exists!

"[progress] [00001.209] [workspaceStartup] 1 / 2: file:///C%3A/Users/aminy/Documents/GitHub/JavaScript/atom-ide-d/spec/fixtures"

stderr 0x00007FF7DD2F2495 in workspaced.backend.WorkspaceD.addInstance at C:\Users\aminy\AppData\Local\dub\packages\workspace-d-3.6.0-pre.8\workspace-d\source\workspaced\backend.d(565)

stderr 0x00007FF7DD0C35E4 in served.extension.doStartup at C:\Users\aminy\Documents\GitHub\D\serve-d\source\served\extension.d(711)

stderr 0x00007FF7DD0C1127 in served.extension.changedConfig at C:\Users\aminy\Documents\GitHub\D\serve-d\source\served\extension.d(124)
@aminya aminya added the bug label Feb 24, 2021
@aminya aminya pinned this issue Feb 24, 2021
@aminya
Copy link
Member Author

aminya commented Feb 24, 2021

@WebFreak001 Any idea about this?

@WebFreak001
Copy link
Member

WebFreak001 commented Feb 24, 2021

is the LSP client sending didChangeWorkspaceFolders before config changes like at startup? It seems it registers the same folder twice.

@WebFreak001
Copy link
Member

ah the issue might actually be that there is a trailing /

@WebFreak001
Copy link
Member

I pushed some changes to serve-d, try building them from source to see if that fixes the issue.

@aminya
Copy link
Member Author

aminya commented Feb 24, 2021

Nothing changed.

stderr 2021-02-24T15:08:22.646 [info] source\served\extension.d:667:rootsForProject Root Suggestions: [RootSuggestion("C:\\Users\\aminy\\Documents\\GitHub\\JavaScript\\atom-ide-d\\spec\\fixtures\\", true), RootSuggestion("C:\\Users\\aminy\\Documents\\GitHub\\JavaScript\\atom-ide-d\\spec\\fixtures", true)]


stderr 2021-02-24T15:08:22.785 [info] source\served\extension.d:701:doStartup Initializing instance for root RootSuggestion("C:\\Users\\aminy\\Documents\\GitHub\\JavaScript\\atom-ide-d\\spec\\fixtures", true)

stderr object.Exception@..\..\..\..\AppData\Local\dub\packages\workspace-d-3.6.0-pre.8\workspace-d\source\workspaced\backend.d(564): Instance with cwd 'C:\Users\aminy\Documents\GitHub\JavaScript\atom-ide-d\spec\fixtures' already exists!

@aminya
Copy link
Member Author

aminya commented Feb 24, 2021

When you spawn serve-d, what should be the cwd?

cwd: projectPath,

Changing cwd to cwd: dirname(serveDPath), doesn't fix the issue

@aminya
Copy link
Member Author

aminya commented Feb 24, 2021

I also get this error when I open serve-d project itself. The limit seems to be set very low by default.
image

@WebFreak001
Copy link
Member

sorry, I forgot Windows uses \ as path separator, try again with master now.

@WebFreak001
Copy link
Member

the manyProjectsThreshold needs to be improved on serve-d side anyway as there is lazy loading now, which means it should only complain once you loaded that many projects.

@aminya
Copy link
Member Author

aminya commented Feb 24, 2021

Unfortunately, the error still happens. The log has changed:

[trace] source\served\extension.d:534:doGlobalStartup Starting dlangui


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.500 [trace] source\served\extension.d:536:doGlobalStartup Starting importer


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.500 [trace] source\served\extension.d:538:doGlobalStartup Starting moduleman


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.500 [trace] source\served\extension.d:540:doGlobalStartup Starting snippets


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.501 [trace] source\served\extension.d:681:doStartup Initializing serve-d for file:///C:/Users/aminy/Documents/GitHub/JavaScript/atom-ide-d/spec/fixtures/


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.502 [info] source\served\extension.d:667:rootsForProject Root Suggestions: [RootSuggestion("C:\\Users\\aminy\\Documents\\GitHub\\JavaScript\\atom-ide-d\\spec\\fixtures\\", true), RootSuggestion("C:\\Users\\aminy\\Documents\\GitHub\\JavaScript\\atom-ide-d\\spec\\fixtures", true)]


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.502 [info] source\served\extension.d:701:doStartup Initializing instance for root RootSuggestion("C:\\Users\\aminy\\Documents\\GitHub\\JavaScript\\atom-ide-d\\spec\\fixtures\\", true)


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.502 [trace] source\served\types.d:565:activeInstance Setting active instance to C:\Users\aminy\Documents\GitHub\JavaScript\atom-ide-d\spec\fixtures.


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.502 [trace] source\served\extension.d:728:doStartup Starting dub...


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.642 [trace] source\served\extension.d:750:doStartup Started dub with root dependencies []


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.642 [trace] source\served\extension.d:777:doStartup Started files provider for root RootSuggestion("C:\\Users\\aminy\\Documents\\GitHub\\JavaScript\\atom-ide-d\\spec\\fixtures\\", true)


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.642 [trace] source\served\extension.d:779:doStartup Loaded Components for C:\Users\aminy\Documents\GitHub\JavaScript\atom-ide-d\spec\fixtures: ["dub"]


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.642 [info] source\served\extension.d


logger.ts:19 D (serve-d) stderr :785:doStartup Root RootSuggestion("C:\\Users\\aminy\\Documents\\GitHub\\JavaScript\\atom-ide-d\\spec\\fixtures\\", true) initialized in 140 ms and 477 μs


logger.ts:19 D (serve-d) stderr 2021-02-24T15:17:55.642 [info] source\served\extension.d:701:doStartup Initializing instance for root RootSuggestion("C:\\Users\\aminy\\Documents\\GitHub\\JavaScript\\atom-ide-d\\spec\\fixtures", true)


logger.ts:19 D (serve-d) stderr 


logger.ts:19 D (serve-d) stderr object.Exception@..\..\..\..\AppData\Local\dub\packages\workspace-d-3.6.0-pre.8\workspace-d\source\workspaced\backend.d(564): Instance with cwd 'C:\Users\aminy\Documents\GitHub\JavaScript\atom-ide-d\spec\fixtures' already exists!


logger.ts:19 D (serve-d) stderr ----------------


logger.ts:19 D (serve-d) stderr 


logger.ts:19 D (serve-d) stderr 0x00007FF764773515 in workspaced.backend.WorkspaceD.addInstance at C:\Users\aminy\AppData\Local\dub\packages\workspace-d-3.6.0-pre.8\workspace-d\source\workspaced\backend.d(565)


logger.ts:19 D (serve-d) stderr 0x00007FF764543774 in served.extension.doStartup at C:\Users\aminy\Documents\GitHub\D\serve-d\source\served\extension.d(715)


logger.ts:19 D (serve-d) stderr 0x00007FF7645412B7 in served.extension.changedConfig at C:\Users\aminy\Documents\GitHub\D\serve-d\source\served\extension.d(124)


logger.ts:19 D (serve-d) stderr 0x00007FF76454B7DD in served.extension.initialize.__lambda4 at C:\Users\aminy\Documents\GitHub\D\serve-d\source\served\extension.d(481)


logger.ts:19 D (serve-d) stderr 0x00007FF7646D2F85 in served.utils.async.parallelMain at C:\Users\aminy\Documents\GitHub\D\serve-d\serverbase\source\served\utils\async.d(51)


logger.ts:19 D (serve-d) stderr 0x00007FF764C28958 in fiber_entryPoint


logger.ts:19 D (serve-d) stderr 0x00007FF764C28F19 in pure nothrow @nogc void core.thread.fiber.Fiber.initStack().trampoline()

@aminya
Copy link
Member Author

aminya commented Feb 24, 2021

This also prevents closing Atom.

image

@WebFreak001
Copy link
Member

try again now, should work this time for sure:tm:

@aminya
Copy link
Member Author

aminya commented Feb 24, 2021

Whee! It is fixed now. 🎉

@aminya
Copy link
Member Author

aminya commented Feb 24, 2021

Fixed in Pure-D/serve-d@3d47689

@aminya aminya closed this as completed Feb 24, 2021
@aminya aminya unpinned this issue Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants