Repository navigation
Conversation
…o me about msbuild
|
insanely zased |
|
xmldoc should probably be gitignored since it'll be regenerated anyway |
Yes I was hoping someone would weigh in on this. |
|
|
…et the tempFilename
c1401b3 to
8e21e9e
Compare
…n the server and only be sent to users with vv access.
|
2026 Update I didn't manage to prepare in time for the Sep 7th anniversary of the original pr. c'est la vive. The configuration instruction for this is now simply to add: To a
Inflates the warning count to 681. Due to some xml in the project being invalid. I have a follow up PR to address most of these. We ignore |
This is required to stop everything from wobbling when XMLDoc is too long, and makes sure it's always displaying everything.
Bold looked back, DarkGray was good, just now using white more.
Fildrance
left a comment
There was a problem hiding this comment.
Okay so my comments are mostly minor things, there are several things up in the air but considering this is quite niche feature and it is okay to drop it as a matter of graceful degradation (i wish we had one for perf but i mean feature-richness wise, if it crashes of fails - not so much of a problem, game is still playable, unless it crashes the game).
I got a little bit tired to the end of the thing, and i felt really lacking in understanding what is multithread-threat engine-wise there, and what is okay to be - i know a lot of stuff is running on single thread, but there are async interactions, but i am just lacking knowledge on how generally engine works thread-wise (considering access to stuff like UI elements from different threads, etc). I feel like engine in general does not have PROPER tooling to do what you are doing, but building full idiot-proof infrastructure just for that feature seams insane, so i guess we are fine there?
Its nice if you could apply some stuff i proposed, and we could try think about solutions to problems i mentioned, or they could be not really a problem <_<
| var missingKeys = new List<string>(); | ||
| var missingIdx = new List<int>(); |
There was a problem hiding this comment.
could it be better to use HashSet for those?
|
|
||
| if (missingKeys.Count == 0 || !_netManager.IsConnected) | ||
| { | ||
| foreach (var i in missingIdx) |
There was a problem hiding this comment.
if missingKeys.Count == 0 , then missingIdx is empty, so that loop would effectively is doing nothing (probably separate early return is better?). And i am a bit confused how _netManager.IsConnected flag is working here... why would we need to do any of this if we are not connected?
| { | ||
| var count = Math.Min(MsgViewVariablesReqDocStrings.MaxKeys, missingKeys.Count - start); | ||
| var chunk = missingKeys.GetRange(start, count); | ||
| var remote = await RequestDocStrings(kind, chunk); |
There was a problem hiding this comment.
I would propose naming it promise or task, or something along those lines.
| { | ||
| var count = Math.Min(MsgViewVariablesReqDocStrings.MaxKeys, missingKeys.Count - start); | ||
| var chunk = missingKeys.GetRange(start, count); | ||
| var remote = await RequestDocStrings(kind, chunk); |
There was a problem hiding this comment.
Having no parallelism here is a bit odd. Should there be? From what i see that should not really be a problem, and doing parallelism here would be a dirty thing in itself, not trivial. Considering the only thing that currently would ask for batches is server-side components... should not be a problem i presume?
|
|
||
| for (var i = 0; i < targets.Count; i++) | ||
| { | ||
| targets[i].Apply(docStrings[i]); |
There was a problem hiding this comment.
As this can contain basically anything - i would propose a bit of redundancy - wrapping whole thing in try-catch and logging any suspicious stuff. Otherwise async void method will fall silently and you will never know whats going on.
This is needed to make things wrap correctly.



Overview
Adds code that can read the xml files generated by C# documentation comments and display those comments (currently the
<summary>block) below types and variables inView Variableswindows.This PR doesn't (yet) actually toggle the xml doc file generation. You should add<GenerateDocumentationFile>True</GenerateDocumentationFile>to the csproj of the project you want to generate docs for then copy the resulting xml file intoResources/ViewVariables. You can use this to test this PR with the xml docs from content as well.I will do a content PR when this gets merged but to test you need to add:
to the Content
csprojfiles to get them generating the doc files correctly.The xml docs are a little big, and they contain a bunch of info we're never going to use like function documentation. It wouldn't be to hard to have a script that discards unneeded entries to optimize the size of the resulting files.All the individual doc strings are loaded from the client resources folder, we don't send the doc strings over the network.XML docs generated for server dlls get generated into
/Resources/Server/and that file is ignored during the client content build. Server docs get sent over the wire to users with VV access. Client and Shared xml docs get bundled into the client content package and are thus always visible.Since this info comes from the code (just like the type and variable names) we can't really expect to localize this text.
That may be a deal-breaker.TODO
<summary>block breaking the doc string.<inheritdoc/>but it might be in a follow-up PR.<GenerateDocumentationFile>to the csproj files.Resourcesfolder cleanly. Right now it's only enabled for the Robust DLLS. If you want to test it locally you can add<ViewVariables>true</ViewVariables>to the Content DLLS.You may need to an an emptyResources\ViewVariables\folder for the build to work properly.<viewvariables>block inside the xml comments that can add docs tailor-made for vv[ ] cleaner code[ ] (?) CVar config?[ ] (?) Improve the UI slightly to better accommodate the new doc strings