Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

Extension load error "cannot find type Def in typeInfoMap" #119

Closed
Wolfsblvt opened this issue May 26, 2022 · 21 comments
Closed

Extension load error "cannot find type Def in typeInfoMap" #119

Wolfsblvt opened this issue May 26, 2022 · 21 comments
Assignees
Labels
bug Something isn't working

Comments

@Wolfsblvt
Copy link
Contributor

Wolfsblvt commented May 26, 2022

Hey,
no matter what I'm trying, I can't seem to get your installation to work.

I already moved Rimworld to the default install path to prevent problems that I've read about here, I entered all paths in the extension settings manually.

Now when my newly created nearly empty mod folder, the extension doesn't load up. Extension Output log shows:

current log level: debug
hello world! initializing @rwxml-language-server/language-server ...
initialization completed!
[warn] [f] [default] cannot find type Def in typeInfoMap. something isn't right.
[info] [r] [default] [15982c8c-ac06-4486-a584-f4d8be084e59] reloading project... reason: project initialize
[info] [r] [default] [15982c8c-ac06-4486-a584-f4d8be084e59] loading project resources...
[info] [r] [default] [15982c8c-ac06-4486-a584-f4d8be084e59] clear project...
[info] [r] [default] [15982c8c-ac06-4486-a584-f4d8be084e59] project cleared.
[info] [r] [default] [15982c8c-ac06-4486-a584-f4d8be084e59] project evaluated.

The extension is enabled, but doesn't show any runtime info, like other extension would do when they are loaded:
image

This is a pretty fresh install of Visual Code.

I love the idea of your extensions, and would be really happy if I could get this to work.

EDIT: I also tried opening the Rimworld folder itself, and some workshop mod folders, always the same errors.
I tried to dive into the code to see which def it tried to load, but it got a bit confusing. Are you loading DLLs manually there to register type definitions?

@zzzz465
Copy link
Owner

zzzz465 commented May 27, 2022

EDIT: I also tried opening the Rimworld folder itself, and some workshop mod folders, always the same errors.
I tried to dive into the code to see which def it tried to load, but it got a bit confusing. Are you loading DLLs manually there to register type definitions?

yes. the extension loads all required metadatas from reading DLL. this is because Ludeon Studios doesn't allow third party distribution of the game file. (dlls, defs, etc...)

Hey,
no matter what I'm trying, I can't seem to get your installation to work.
I already moved Rimworld to the default install path to prevent problems that I've read about here, I entered all paths in the extension settings manually.

I should've printed logs with more detail for easy debugging. I'll add more of it so it helps finding what is broken.
while I'm working, if you can set-up project environment, you can launch as VSCode debug mode to see what's going on in (extension) client. the log you're seeing is from server side.

@Wolfsblvt
Copy link
Contributor Author

if you can set-up project environment, you can launch as VSCode debug mode to see what's going on in (extension) client.

How do I launch VSCode in debug mode? You mean debugging the extension, so cloning your repo and trying to debug it?

Thanks for responding so quick and trying to help out!

@zzzz465
Copy link
Owner

zzzz465 commented May 27, 2022

How do I launch VSCode in debug mode? You mean debugging the extension, so cloning your repo and trying to debug it?

you can clone the repo, and launch vscode to enter extension debug mode.

I described how to set-up a project on readme.

you need the following tools

  • C# 4.7.2 development kit (install through VisualStudio is suggested.)
  • nuget.exe
  • vscode (obviously?)
  • node.js

@zzzz465
Copy link
Owner

zzzz465 commented May 27, 2022

I released v0.32.0 which improve logging on client/server side.
please upload your log with the newer version so I can debug it.

@Wolfsblvt
Copy link
Contributor Author

Wolfsblvt commented May 27, 2022

Trying to set up the dev environment on windows. Got it working mostly, I can build the source with pnpm install without errors now, but I am getting error on running with the webpack.
Do I have to install that too, isn't it bundled with your files?

image

And when I try to install webpack via npm, it throws an error:

image

So if I can't test it locally, I can't provide you with a new log yet, as I guess you haven't updated the marketplace version yet.

@Wolfsblvt
Copy link
Contributor Author

So I guess the run watch is needed to start/debug the extension? When I try to run the client via VSCode it shows me this error in the client, the extension is not loaded:

image

And do I have to run in the main folder, or the extension folder? Running in the extension folder gives me a different error, with an invalid config file:

image

I'm so sorry for causing this much trouble.

@Wolfsblvt
Copy link
Contributor Author

Okay, I was being a bit too fast, I removed the invalid comment from tsconfig.json and can now successfully run pnpm run watch in the vsc-extension folder.

Getting a different error now when I launch the client...

image
image

One step after the other, right..?

@Wolfsblvt
Copy link
Contributor Author

Man, I am really diving deep right now. Hope you are still on board with me :D

I fixed some config errors and even made a pull request for those, if you wanna check that. Now I can successfully run the watch command on the root folder.

Still getting the DependencyResourceProvider exception:
image

Exception has occurred: Error: TypeInfo not known for "DependencyResourceProvider"
t InternalDependencyContainer.construct (d:\code\rwxml-language-server\vsc-extension\dist\index.js:64499:23)
	at InternalDependencyContainer.resolveRegistration (d:\code\rwxml-language-server\vsc-extension\dist\index.js:64358:24)
	at d:\code\rwxml-language-server\vsc-extension\dist\index.js:64381:30
	at Array.map (<anonymous>)
	at InternalDependencyContainer.resolveAll (d:\code\rwxml-language-server\vsc-extension\dist\index.js:64380:42)
	at activate (d:\code\rwxml-language-server\vsc-extension\dist\index.js:85054:77)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async _activate (c:\Users\Wolfsblvt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:8180)
	at async _waitForDepsThenActivate (c:\Users\Wolfsblvt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:8122)
	at async _initialize (c:\Users\Wolfsblvt\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:7486)

The exception is happening right here:

const resourceProviders = container.resolveAll<resources.Provider>(resources.Provider.token)

@zzzz465
Copy link
Owner

zzzz465 commented May 27, 2022

Okay, I was being a bit too fast, I removed the invalid comment from tsconfig.json and can now successfully run pnpm run watch in the vsc-extension folder.
#122

Still getting the DependencyResourceProvider exception:

I don't know why it is broken. I'm trying to figure it out...

@Wolfsblvt
Copy link
Contributor Author

Wolfsblvt commented May 27, 2022

I think there is some kind of underlying issue how syringe resolves the depency objects, as it can't finde the type info to construct those objects, from what it looks like.

I could fix the DependencyResourceProvider issue by specifying the injected class in the constructor definition, not that error is gone, yay.
Running on the next error now.... This time it's the LogManager class. Which.... doesn't have constructor arguments, and as a singleton should be easily creatable by the resolver? TypeInfo not known for "LogManager" at handleResponse (d:\code\rwxml-language-server\vsc-extension\dist\index.js:66400:48)
I tried adding the default constructor without parameters explicitly, still same errors. Is there any class in the scope that I could inject with a similar constructor, just to test it out if this is the issue? ModManager does not exist here.

image

I can submit a PR for that later, but I think we will run into a few more DI errors...

Google says maybe the LogManager has to be imported explicitly as import type on the index script, but that doesn't seem to work either.

@zzzz465 zzzz465 self-assigned this May 27, 2022
@zzzz465
Copy link
Owner

zzzz465 commented May 27, 2022

@Wolfsblvt thanks for investigating issues. I merged a PR to fix the detailed issue you posted. check #123

after a CI build completes, the new version will be released. you can use that (takes up to ~ 30min for upload to marketplace)

@Wolfsblvt
Copy link
Contributor Author

Wolfsblvt commented May 27, 2022

Thanks, I will test this again once the CI build is working again! (As it looks like the CI is still broken, build failing)

@zzzz465
Copy link
Owner

zzzz465 commented May 28, 2022

@zzzz465
Copy link
Owner

zzzz465 commented May 28, 2022

v0.32.4 is released and now you can read client / server log from output channels.
image

@Wolfsblvt
Copy link
Contributor Author

Nice, that's a pretty detailed log now!

So, either I am not understanding correctly what the Extension actually is doing, or it doesn't really load up any of the features.
I feel like it should let me F12 jump to parents in ThingDef ParentName definitions. Which kind of additional syntax highlighting and auto completion is included, so that I can test that?

I also tried opening several mods in my workshop folder, and none really showed any features available either, with similar logs. Nothing happening on opening the "Data" folder in Rimworld install either.

So am I understanding something wrong, or is it not working for me?

Attached both client and server logs. Server still has the one with "Def" not found that looks like it might be culprit.

Server Log

log level changed to debug
[info]	[undefined]:	hello world! initializing @rwxml-language-server/server ...
[info]	[undefined]:	initialization completed!
(node:52932) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 uncaughtException listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `Code --trace-warnings ...` to show where the warning was created)
[info]	[About]:	about file changed.
[debug]	[About]:	updating paths because about.xml path is changed.
[debug]	[About]:	about.xml path: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch/About/About.xml
[debug]	[About]:	rootDirectory path: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch
[debug]	[LoadFolder]:	reloading because About.xml path is changed. new source: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch/LoadFolders.xml
[debug]	[LoadFolder]:	updated workspaces: [
  {
    "relativeDirectories": [
      "."
    ],
    "rootDir": {
      "$mid": 1,
      "path": "/c:/Program Files (x86)/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch",
      "scheme": "file"
    },
    "version": "default"
  },
  {
    "relativeDirectories": [
      "."
    ],
    "rootDir": {
      "$mid": 1,
      "path": "/c:/Program Files (x86)/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch",
      "scheme": "file"
    },
    "version": "1.3"
  }
]
[debug]	[LoadFolder]:	default workspace: {
  "relativeDirectories": [
    "."
  ],
  "rootDir": {
    "$mid": 1,
    "path": "/c:/Program Files (x86)/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch",
    "scheme": "file"
  },
  "version": "default"
}
[warn]	[DefManager]:	cannot find type Def in typeInfoMap. something isn't right.
[warn]	[DefManager]:	cannot find type Def in typeInfoMap. something isn't right.
[info]	[ProjectManager]:	supportedVersions added: [
  "default",
  "1.3"
]
[info]	[ProjectManager]:	supportedVersions deleted: []
[debug]	[AboutMetadata]:	reloading because About.xml path is changed. new source: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch/About/metadata_rwxml.xml
[debug]	[AboutMetadata]:	aboutMetadata updated.
[debug]	[AboutMetadata]:	items: {}
[debug]	[AboutMetadata]:	default: undefined
[debug]	[ModDependencyBags]:	updating state because AboutMetadata is changed.
[debug]	[ModDependencyBags]:	updating state because about.xml is changed.
[info]	[Project]	(c0ac73c5-d602-4c13-ae49-9ce7fb1fe744):	reloading project... reason: project initialize
[info]	[Project]	(c0ac73c5-d602-4c13-ae49-9ce7fb1fe744):	loading project resources...
[info]	[Project]	(c0ac73c5-d602-4c13-ae49-9ce7fb1fe744):	clear project...
[debug]	[Project]	(c0ac73c5-d602-4c13-ae49-9ce7fb1fe744):	current project file dll count: 0
[debug]	[TypeInfoMapProvider]	(c0ac73c5-d602-4c13-ae49-9ce7fb1fe744):	requesting typeInfo. count: 0
[debug]	[TypeInfoMapProvider]	(c0ac73c5-d602-4c13-ae49-9ce7fb1fe744):	received typeInfo from client, length: 15063
[info]	[Project]	(c0ac73c5-d602-4c13-ae49-9ce7fb1fe744):	project cleared.
[info]	[Project]	(c0ac73c5-d602-4c13-ae49-9ce7fb1fe744):	project evaluated.
[info]	[Project]	(ade22d38-9ebf-4faa-be6d-80051a0e869d):	reloading project... reason: dll is changed.
[info]	[Project]	(ade22d38-9ebf-4faa-be6d-80051a0e869d):	loading project resources...
[info]	[Project]	(ade22d38-9ebf-4faa-be6d-80051a0e869d):	clear project...
[debug]	[Project]	(ade22d38-9ebf-4faa-be6d-80051a0e869d):	current project file dll count: 1
[debug]	[TypeInfoMapProvider]	(ade22d38-9ebf-4faa-be6d-80051a0e869d):	requesting typeInfo. count: 1
[debug]	[TypeInfoMapProvider]	(ade22d38-9ebf-4faa-be6d-80051a0e869d):	received typeInfo from client, length: 15102
[info]	[Project]	(ade22d38-9ebf-4faa-be6d-80051a0e869d):	project cleared.
[info]	[Project]	(ade22d38-9ebf-4faa-be6d-80051a0e869d):	project evaluated.
[warn]	[DefManager]:	cannot find type Def in typeInfoMap. something isn't right.
[warn]	[DefManager]:	cannot find type Def in typeInfoMap. something isn't right.
[warn]	[DefManager]:	cannot find type Def in typeInfoMap. something isn't right.
[info]	[Project]	(516df1c7-6651-4c82-b978-4245ec575ee9):	reloading project... reason: project initialize
[info]	[Project]	(516df1c7-6651-4c82-b978-4245ec575ee9):	loading project resources...
[info]	[Project]	(516df1c7-6651-4c82-b978-4245ec575ee9):	clear project...
[debug]	[Project]	(516df1c7-6651-4c82-b978-4245ec575ee9):	current project file dll count: 0
[debug]	[TypeInfoMapProvider]	(516df1c7-6651-4c82-b978-4245ec575ee9):	requesting typeInfo. count: 0
[info]	[Project]	(35a83c59-a972-4502-8a26-9aca9d66dd6a):	reloading project... reason: project initialize
[info]	[Project]	(35a83c59-a972-4502-8a26-9aca9d66dd6a):	loading project resources...
[info]	[Project]	(35a83c59-a972-4502-8a26-9aca9d66dd6a):	clear project...
[debug]	[Project]	(35a83c59-a972-4502-8a26-9aca9d66dd6a):	current project file dll count: 0
[debug]	[TypeInfoMapProvider]	(35a83c59-a972-4502-8a26-9aca9d66dd6a):	requesting typeInfo. count: 0
[info]	[Project]	(0567ae92-bef2-4aeb-ad2b-98479baa0a36):	reloading project... reason: project initialize
[info]	[Project]	(0567ae92-bef2-4aeb-ad2b-98479baa0a36):	loading project resources...
[info]	[Project]	(0567ae92-bef2-4aeb-ad2b-98479baa0a36):	clear project...
[debug]	[Project]	(0567ae92-bef2-4aeb-ad2b-98479baa0a36):	current project file dll count: 0
[debug]	[TypeInfoMapProvider]	(0567ae92-bef2-4aeb-ad2b-98479baa0a36):	requesting typeInfo. count: 0
[debug]	[TypeInfoMapProvider]	(516df1c7-6651-4c82-b978-4245ec575ee9):	received typeInfo from client, length: 15063
[info]	[Project]	(516df1c7-6651-4c82-b978-4245ec575ee9):	project cleared.
[info]	[Project]	(516df1c7-6651-4c82-b978-4245ec575ee9):	project evaluated.
[debug]	[TypeInfoMapProvider]	(0567ae92-bef2-4aeb-ad2b-98479baa0a36):	received typeInfo from client, length: 15063
[info]	[Project]	(0567ae92-bef2-4aeb-ad2b-98479baa0a36):	project cleared.
[info]	[Project]	(0567ae92-bef2-4aeb-ad2b-98479baa0a36):	project evaluated.
[debug]	[TypeInfoMapProvider]	(35a83c59-a972-4502-8a26-9aca9d66dd6a):	received typeInfo from client, length: 15063
[info]	[Project]	(35a83c59-a972-4502-8a26-9aca9d66dd6a):	project cleared.
[info]	[Project]	(35a83c59-a972-4502-8a26-9aca9d66dd6a):	project evaluated.

Client Log

[info]	[undefined]:	registering commands...
[info]	[undefined]:	initializing Language Server...
[debug]	[undefined]:	server module absolute path: c:\Users\Wolfsblvt\.vscode\extensions\madeline.rwxml-lang-serv-0.32.4\dist\language-server\index.js
[info]	[undefined]:	initializing resourceProviders...
[debug]	[ProjectWatcher]:	ModManager watching directories: [
  "c:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Data",
  "c:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Mods",
  "c:\\Program Files (x86)\\Steam\\steamapps\\workshop\\content\\294100"
]
[info]	[undefined]:	checking Runtime TypeInfo Extractor available...
[info]	[undefined]:	register lsp features...
[info]	[undefined]:	initialize Project Watcher...
[info]	[undefined]:	initialization completed.
[debug]	[ProjectWatcher]:	sending initial load files. count: 5
[debug]	[DependencyResourceProvider]:	received dependency request for packageId: Mlie.IndustrialRollers, version: default
[debug]	[DependencyResourceProvider]:	found 43 dependency files in packageId: Mlie.IndustrialRollers
[debug]	[DependencyResourceProvider]:	received dependency request for packageId: Ludeon.RimWorld, version: default
[debug]	[DependencyResourceProvider]:	found 492 dependency files in packageId: Ludeon.RimWorld
[debug]	[DependencyResourceProvider]:	received dependency request for packageId: Mlie.IndustrialRollers, version: 1.3
[debug]	[DependencyResourceProvider]:	found 44 dependency files in packageId: Mlie.IndustrialRollers
[debug]	[DependencyResourceProvider]:	received dependency request for packageId: Ludeon.RimWorld, version: 1.3
[debug]	[DependencyResourceProvider]:	found 492 dependency files in packageId: Ludeon.RimWorld
[debug]	[CachedTypeInfoProvider]:	received typeInfo request. uris count: 0
[debug]	[CachedTypeInfoProvider]:	received typeInfo request. uris count: 1
[debug]	[CachedTypeInfoProvider]:	received typeInfo request. uris count: 0
[debug]	[CachedTypeInfoProvider]:	received typeInfo request. uris count: 0
[debug]	[CachedTypeInfoProvider]:	received typeInfo request. uris count: 0

@Wolfsblvt
Copy link
Contributor Author

Wolfsblvt commented May 28, 2022

Okay, I tested a bit more, digged through some old issues here, and found another possible cause. I got a few mods that got some features loaded, and I noticed they all had a LoadFolders.xml file. I added one to my test mod, and it started to load up.
Is this file needed for this extension to work?
I can live with that, but it would make looking into other mods with this extension a bit more difficult.

The cannot find type Def in typeInfoMap. something isn't right. error is still there though, and I don't know if that might cause issues?
I made a few test Defs, just copy&paste, and most of the things I expected seem to be working. Some issues though.

  • The ParentName tag does have a popup of the parent definition, but F12/Go to definition does not work there. Works in other popup/underlined places, like inside researchPrerequisites.
  • My own abstract def has no quick info line above. Should show that it is referenced once. Checking other mods that work as well none of the abstract defs have that line above.
  • Go to references on the abstract def doesn't work

Something wrong on my end? Are those known issues? Should I open a new GitHub issue?

image

On one workshop mod the References info shows up for times :D

image

Server Log

log level changed to debug
[info]	[undefined]:	hello world! initializing @rwxml-language-server/server ...
[info]	[undefined]:	initialization completed!
(node:51232) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 uncaughtException listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `Code --trace-warnings ...` to show where the warning was created)
[info]	[About]:	about file changed.
[debug]	[About]:	updating paths because about.xml path is changed.
[debug]	[About]:	about.xml path: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch/About/About.xml
[debug]	[About]:	rootDirectory path: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch
[debug]	[LoadFolder]:	reloading because About.xml path is changed. new source: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch/LoadFolders.xml
[warn]	[DefManager]:	cannot find type Def in typeInfoMap. something isn't right.
[warn]	[DefManager]:	cannot find type Def in typeInfoMap. something isn't right.
[info]	[ProjectManager]:	supportedVersions added: [
  "default",
  "1.3"
]
[info]	[ProjectManager]:	supportedVersions deleted: []
[debug]	[AboutMetadata]:	reloading because About.xml path is changed. new source: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch/About/metadata_rwxml.xml
[debug]	[AboutMetadata]:	aboutMetadata updated.
[debug]	[AboutMetadata]:	items: {}
[debug]	[AboutMetadata]:	default: undefined
[debug]	[ModDependencyBags]:	updating state because AboutMetadata is changed.
[debug]	[ModDependencyBags]:	updating state because about.xml is changed.
[debug]	[LoadFolder]:	updated workspaces: [
  {
    "relativeDirectories": [
      "/"
    ],
    "rootDir": {
      "$mid": 1,
      "path": "/c:/Program Files (x86)/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch",
      "scheme": "file"
    },
    "version": "1.3"
  },
  {
    "relativeDirectories": [
      "."
    ],
    "rootDir": {
      "$mid": 1,
      "path": "/c:/Program Files (x86)/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch",
      "scheme": "file"
    },
    "version": "default"
  }
]
[debug]	[LoadFolder]:	default workspace: {
  "relativeDirectories": [
    "."
  ],
  "rootDir": {
    "$mid": 1,
    "path": "/c:/Program Files (x86)/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch",
    "scheme": "file"
  },
  "version": "default"
}
[info]	[Project]	(64f3a2d5-40a3-4ea3-879b-e4f156b62e9f):	reloading project... reason: project initialize
[info]	[Project]	(64f3a2d5-40a3-4ea3-879b-e4f156b62e9f):	loading project resources...
[info]	[Project]	(64f3a2d5-40a3-4ea3-879b-e4f156b62e9f):	clear project...
[debug]	[Project]	(64f3a2d5-40a3-4ea3-879b-e4f156b62e9f):	current project file dll count: 0
[debug]	[TypeInfoMapProvider]	(64f3a2d5-40a3-4ea3-879b-e4f156b62e9f):	requesting typeInfo. count: 0
[debug]	[TypeInfoMapProvider]	(64f3a2d5-40a3-4ea3-879b-e4f156b62e9f):	received typeInfo from client, length: 15063
[info]	[Project]	(64f3a2d5-40a3-4ea3-879b-e4f156b62e9f):	project cleared.
[info]	[Project]	(64f3a2d5-40a3-4ea3-879b-e4f156b62e9f):	project evaluated.
[info]	[Project]	(f3e678e8-3626-45ff-82d7-3f21a254113f):	reloading project... reason: dll is changed.
[info]	[Project]	(f3e678e8-3626-45ff-82d7-3f21a254113f):	loading project resources...
[info]	[Project]	(f3e678e8-3626-45ff-82d7-3f21a254113f):	clear project...
[debug]	[Project]	(f3e678e8-3626-45ff-82d7-3f21a254113f):	current project file dll count: 1
[debug]	[TypeInfoMapProvider]	(f3e678e8-3626-45ff-82d7-3f21a254113f):	requesting typeInfo. count: 1
[debug]	[DiagnosticsProvider]:	[default] send diagnostics to uri: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch/Defs/ThingDefTest.xml, items: 0
[debug]	[DiagnosticsProvider]:	[default] send diagnostics to uri: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch/Defs/ResearchProjectDef/Research.xml, items: 0
[debug]	[TypeInfoMapProvider]	(f3e678e8-3626-45ff-82d7-3f21a254113f):	received typeInfo from client, length: 15102
[info]	[Project]	(f3e678e8-3626-45ff-82d7-3f21a254113f):	project cleared.
[info]	[Project]	(f3e678e8-3626-45ff-82d7-3f21a254113f):	project evaluated.
[debug]	[DiagnosticsProvider]:	[1.3] send diagnostics to uri: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch/Defs/ThingDefTest.xml, items: 0
[debug]	[DiagnosticsProvider]:	[1.3] send diagnostics to uri: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch/Defs/ResearchProjectDef/Research.xml, items: 0
[debug]	[DiagnosticsProvider]:	[default] send diagnostics to uri: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch/Defs/ResearchProjectDef/Research.xml, items: 0
[debug]	[DiagnosticsProvider]:	[1.3] send diagnostics to uri: file:///c%3A/Program%20Files%20%28x86%29/Steam/steamapps/common/RimWorld/Mods/IndustrialRollersResearch/Defs/ResearchProjectDef/Research.xml, items: 0
[warn]	[DefManager]:	cannot find type Def in typeInfoMap. something isn't right.
[warn]	[DefManager]:	cannot find type Def in typeInfoMap. something isn't right.
[warn]	[DefManager]:	cannot find type Def in typeInfoMap. something isn't right.
[info]	[Project]	(2a03c57e-d6da-4643-a8df-cd7115df36ae):	reloading project... reason: project initialize
[info]	[Project]	(2a03c57e-d6da-4643-a8df-cd7115df36ae):	loading project resources...
[info]	[Project]	(2a03c57e-d6da-4643-a8df-cd7115df36ae):	clear project...
[debug]	[Project]	(2a03c57e-d6da-4643-a8df-cd7115df36ae):	current project file dll count: 0
[debug]	[TypeInfoMapProvider]	(2a03c57e-d6da-4643-a8df-cd7115df36ae):	requesting typeInfo. count: 0
[info]	[Project]	(71a6da3d-8513-4612-bd4b-ab3eb8343ee8):	reloading project... reason: project initialize
[info]	[Project]	(71a6da3d-8513-4612-bd4b-ab3eb8343ee8):	loading project resources...
[info]	[Project]	(71a6da3d-8513-4612-bd4b-ab3eb8343ee8):	clear project...
[debug]	[Project]	(71a6da3d-8513-4612-bd4b-ab3eb8343ee8):	current project file dll count: 0
[debug]	[TypeInfoMapProvider]	(71a6da3d-8513-4612-bd4b-ab3eb8343ee8):	requesting typeInfo. count: 0
[info]	[Project]	(9b62cb0e-ea0c-45dd-81fc-9ae59d72abf5):	reloading project... reason: project initialize
[info]	[Project]	(9b62cb0e-ea0c-45dd-81fc-9ae59d72abf5):	loading project resources...
[info]	[Project]	(9b62cb0e-ea0c-45dd-81fc-9ae59d72abf5):	clear project...
[debug]	[Project]	(9b62cb0e-ea0c-45dd-81fc-9ae59d72abf5):	current project file dll count: 0
[debug]	[TypeInfoMapProvider]	(9b62cb0e-ea0c-45dd-81fc-9ae59d72abf5):	requesting typeInfo. count: 0
[debug]	[TypeInfoMapProvider]	(2a03c57e-d6da-4643-a8df-cd7115df36ae):	received typeInfo from client, length: 15063
[info]	[Project]	(2a03c57e-d6da-4643-a8df-cd7115df36ae):	project cleared.
[info]	[Project]	(2a03c57e-d6da-4643-a8df-cd7115df36ae):	project evaluated.
[debug]	[TypeInfoMapProvider]	(9b62cb0e-ea0c-45dd-81fc-9ae59d72abf5):	received typeInfo from client, length: 15063
[info]	[Project]	(9b62cb0e-ea0c-45dd-81fc-9ae59d72abf5):	project cleared.
[info]	[Project]	(9b62cb0e-ea0c-45dd-81fc-9ae59d72abf5):	project evaluated.
[debug]	[TypeInfoMapProvider]	(71a6da3d-8513-4612-bd4b-ab3eb8343ee8):	received typeInfo from client, length: 15063
[info]	[Project]	(71a6da3d-8513-4612-bd4b-ab3eb8343ee8):	project cleared.
[info]	[Project]	(71a6da3d-8513-4612-bd4b-ab3eb8343ee8):	project evaluated.

Client Log

[info]	[undefined]:	registering commands...
[info]	[undefined]:	initializing Language Server...
[debug]	[undefined]:	server module absolute path: c:\Users\Wolfsblvt\.vscode\extensions\madeline.rwxml-lang-serv-0.32.4\dist\language-server\index.js
[info]	[undefined]:	initializing resourceProviders...
[debug]	[ProjectWatcher]:	ModManager watching directories: [
  "c:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Data",
  "c:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Mods",
  "c:\\Program Files (x86)\\Steam\\steamapps\\workshop\\content\\294100"
]
[info]	[undefined]:	checking Runtime TypeInfo Extractor available...
[info]	[undefined]:	register lsp features...
[info]	[undefined]:	initialize Project Watcher...
[info]	[undefined]:	initialization completed.
[debug]	[ProjectWatcher]:	sending initial load files. count: 6
[debug]	[DependencyResourceProvider]:	received dependency request for packageId: Mlie.IndustrialRollers, version: default
[debug]	[DependencyResourceProvider]:	found 43 dependency files in packageId: Mlie.IndustrialRollers
[debug]	[DependencyResourceProvider]:	received dependency request for packageId: Ludeon.RimWorld, version: default
[debug]	[DependencyResourceProvider]:	found 492 dependency files in packageId: Ludeon.RimWorld
[debug]	[DependencyResourceProvider]:	received dependency request for packageId: Mlie.IndustrialRollers, version: 1.3
[debug]	[DependencyResourceProvider]:	found 44 dependency files in packageId: Mlie.IndustrialRollers
[debug]	[DependencyResourceProvider]:	received dependency request for packageId: Ludeon.RimWorld, version: 1.3
[debug]	[DependencyResourceProvider]:	found 492 dependency files in packageId: Ludeon.RimWorld
[debug]	[CachedTypeInfoProvider]:	received typeInfo request. uris count: 0
[debug]	[CachedTypeInfoProvider]:	received typeInfo request. uris count: 1
[debug]	[CachedTypeInfoProvider]:	received typeInfo request. uris count: 0
[debug]	[CachedTypeInfoProvider]:	received typeInfo request. uris count: 0
[debug]	[CachedTypeInfoProvider]:	received typeInfo request. uris count: 0

@zzzz465
Copy link
Owner

zzzz465 commented May 28, 2022

[debug] [TypeInfoMapProvider] (71a6da3d-8513-4612-bd4b-ab3eb8343ee8): received typeInfo from client, length: 15063

it seems dll load works fine.

Okay, I tested a bit more, digged through some old issues here, and found another possible cause. I got a few mods that got some features loaded, and I noticed they all had a LoadFolders.xml file. I added one to my test mod, and it started to load up.
Is this file needed for this extension to work?
I can live with that, but it would make looking into other mods with this extension a bit more difficult.

extension can run with/without loadfolders.xml and it should works. if it doesn't, it need to be addressed in a new issue.

The cannot find type Def in typeInfoMap. something isn't right. error is still there though, and I don't know if that might cause issues?

this log happens when the server receives typeInfos from client and there's no data for <Def> which is the base component of all others. meaning that the received data is corrupted.
it displayed at least once because typeInfo is not available yet when initializing project environment. because the data is loaded after the initialization.

The ParentName tag does have a popup of the parent definition, but F12/Go to definition does not work there. Works in other popup/underlined places, like inside researchPrerequisites.

some nodes are not registered as linkable. it is not intended and needs to be fix.

My own abstract def has no quick info line above. Should show that it is referenced once. Checking other mods that work as well none of the abstract defs have that line above.
Go to references on the abstract def doesn't work

quick info is called "CodeLens". anyway, the reason why it's broken is a bit complex.
there's two refernce types, 1. <defName>, 2. Name attribute.
language server manages both types on resolving, but some features supports only one. that's why it doesn't pop up quick info.

you can see codelens code here
as you can see, it checks <defName> value to determine whether to display codelens or not.

it is not a intended feature and needs to be fix.

@zzzz465 zzzz465 added the bug Something isn't working label May 28, 2022
@zzzz465
Copy link
Owner

zzzz465 commented May 28, 2022

Okay, I tested a bit more, digged through some old issues here, and found another possible cause. I got a few mods that got some features loaded, and I noticed they all had a LoadFolders.xml file. I added one to my test mod, and it started to load up.
Is this file needed for this extension to work?

I just remembered that this is a known issue.

@Wolfsblvt
Copy link
Contributor Author

Cheers!

Thanks for taking your time to responding to me and my issues.

If you need help I could see if I can learn how typescript works and help out with code.
I can create issues for the things I noticed, so we don't have this big monster issue that's hard to follow.

Or tell how I can buy you a coffee, for the headaches I caused.

@zzzz465
Copy link
Owner

zzzz465 commented May 28, 2022

I appreciate your coffee but I can get it on my own :3
github star and sharing this is enough for me.
feel free to make an issue if you find any trouble while using it.

you can close this issue anytime if the problem is solved.

@Wolfsblvt
Copy link
Contributor Author

Like your attitude <3 I stared already and I am going to share it whenever I can!

I guess the original problem here is solved, extension is loading and working well, I am going to close it.
I'll open issues for the other issues I experience.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants