sarbian / ModuleManager

176 stars 96 forks source link

:NEEDS[sub/directory] doesn't seem to be functioning #163

Closed 7ranceaddic7 closed 3 years ago

7ranceaddic7 commented 3 years ago

I ran into a situation where MM is warning against GAP

[WRN 20:56:54.535] unrecognized trailer: '' on: ContractPacks/GAP/Flights/Airline-Flight-120/CONTRACT_TYPE:NEEDS[SquadExpansion/MakingHistory]
[WRN 20:56:54.536] unrecognized trailer: '' on: ContractPacks/GAP/Flights/Airline-Flight-122/CONTRACT_TYPE:NEEDS[SquadExpansion/MakingHistory]
[WRN 20:56:54.536] unrecognized trailer: '' on: ContractPacks/GAP/Flights/Airline-Flight-124/CONTRACT_TYPE:NEEDS[SquadExpansion/MakingHistory]
[WRN 20:56:54.537] unrecognized trailer: '' on: ContractPacks/GAP/Flights/Airline-Flight-201/CONTRACT_TYPE:NEEDS[SquadExpansion/MakingHistory]
[WRN 20:56:54.537] unrecognized trailer: '' on: ContractPacks/GAP/Flights/Airline-Flight-202/CONTRACT_TYPE:NEEDS[SquadExpansion/MakingHistory]
[WRN 20:56:54.538] unrecognized trailer: '' on: ContractPacks/GAP/Flights/Airline-Flight-203/CONTRACT_TYPE:NEEDS[SquadExpansion/MakingHistory]
[WRN 20:56:54.538] unrecognized trailer: '' on: ContractPacks/GAP/Flights/Airline-Flight-30/CONTRACT_TYPE:NEEDS[SquadExpansion/MakingHistory]
[WRN 20:56:54.538] unrecognized trailer: '' on: ContractPacks/GAP/Flights/Airline-Flight-320/CONTRACT_TYPE:NEEDS[SquadExpansion/MakingHistory]
[WRN 20:56:54.539] unrecognized trailer: '' on: ContractPacks/GAP/Flights/Airline-Flight-322/CONTRACT_TYPE:NEEDS[SquadExpansion/MakingHistory]
[WRN 20:56:54.539] unrecognized trailer: '' on: ContractPacks/GAP/Flights/Airline-Flight-324/CONTRACT_TYPE:NEEDS[SquadExpansion/MakingHistory]
[WRN 20:56:54.540] unrecognized trailer: '' on: ContractPacks/GAP/Flights/Airline-Flight-360/CONTRACT_TYPE:NEEDS[SquadExpansion/MakingHistory]

I tried to decipher the meaning of "unrecognized trailer" from ProtoPatchBuilder.cs, but alas, I am just beginning to learn C#, so my C-fu is not all that.

REQUEST: Add a section to the wiki with a list and an explainer for errors are and their most common culprits.

EDIT: I'm outlining the wiki page right now. Someone with more intimate knowledge will need to fill in the explainer but it's a start.

7ranceaddic7 commented 3 years ago

Did this ...

https://github.com/sarbian/ModuleManager/wiki/ModuleManager-Errors

blowfishpro commented 3 years ago

There's some weird hidden character in there that's not getting processed correctly. I tried pasting the error message into a text editor that typically shows such things:

[WRN 20:56:54.540] unrecognized trailer: '<U+FEFF>'

From some googling that's a zero-width non-breaking space, probably added by whatever text editor you're using.

My guess based on the error message would be that it's right after the closing ], although I didn't immediately see it in your configs (which it would be helpful to link despite the fact that I found them anyway). I'll load up the configs in my test install and see if I can reproduce the warning.

blowfishpro commented 3 years ago

Oh, doesn't this explain it? https://forum.kerbalspaceprogram.com/index.php?/topic/129208-contract-pack-giving-aircraft-a-purpose-gap-161-milestones-air-flights-coast-guard/&do=findComment&comment=3818634

7ranceaddic7 commented 3 years ago

Yep. That would be it.

Perfect use case. One would think SublimeText, TotalCommander Lister, VS, or VSCode would have revealed something like that.

Unfortunately, none of that explains my bad search-fu. 🤦‍♂️