dev.main branch faq - tooll3/t3 GitHub Wiki
FAQ on the operator structure main branch
Preface
This page summarizes best practices and questions regarding the new operator structure branch.
Using the branch
How can I switch to the branch?
- Install .net 8.0
- Install the latest version of Rider (at least 2023.3) or Visual Studio
- Rebuild solution
Build Warnings for Editor:
There are a bunch of warnings when building Editor:
Building Player
Currently player has some errors caused by Windows forms not being available:
How do I set my username / Where are my Ops?
It would probably be important implement some kind of option to switch between users, so you can see all imported packages...
Migrating: I can I import my previous operators?
Debug vs. Release vs. IDE
Damn you, splash screen!
If an assertion is thrown during startup, the splash-screen is annoying. Is there a method around that?
-> Yes. I added the following change to SplashScreen.cs
:
#if RELEASE
// only force topmost in release builds, to not interfere with debugging
_splashForm.TopMost = true;
#endif
Debugging after exception:
-
Normally, when a exception is thrown, it's possible to click on items in the stack trace to jump to according line of code: Currently this doesn't seem to work:
-
Also, normally you would see line-numbers next to the stack-trace items. Now you only see:
Symbol.CreateInstance() in T3.Core.Operator, Core.dll [2]
-
Maybe we need to include more debug information?
This issue was probably caused by some adjustments of the layout. Restoring it, made the stack-track items clickable again:
Startup in debug / release give different results:
In 451da0e69d5
...
-
debug startups with a bunch of assertions because connection targets are no longer valid.
-
release crashes with "examples" not found
-
IDE crashes in
ProjectSetup.cs:CreateSymLinks()
because -
invalid directory:
C:\Users\pixtur\Documents\T3Projects\cynic
Interestingly creating the target parent folder Documents\T3Projects\
worked just fine.
I tried...
- changing it to relative path
var linkName2 = Path.GetRelativePath(".", linkName);
- Desktop instead of documents
C:\Users\pixtur\Desktop\T3Projects\cynic
- Creating the directory with unix-write mode, which is not supported:
Directory.CreateDirectory(targetDirectory, UnixFileMode.UserWrite);
- Adjusting the readonly-flag from code
- Unsetting the real-only attribute manually with File-Explorer property windows.
Wrong windows-cluster fuck rabbit-hole:
The Read-only and System attributes is only used by Windows Explorer to determine whether the folder is a special folder, such as a system folder that has its view customized by Windows (for example, My Documents, Favorites, Fonts, Downloaded Program Files), or a folder that you customized by using the Customize tab of the folder's Properties dialog box.
Also, the properties of the created directory look kind of funky:
Code details
DEBUG
?
How to (un)define From Core/Operator/Instance.cs:TryGetTargetSlot()
...
#if DEBUG
if (!gotTargetInstance)
{
Debug.Assert(connection.TargetParentOrChildId == Guid.Empty);
}
#endif
General c#/Rider questions:
It's kind of annoying that rider does not correctly use Guid.ToString()
to display guids in a readable format: