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

Fixes 2861 kos prop monitor backporting #2865

Merged

Conversation

Dunbaratu
Copy link
Member

Fixes #2861

Made overrides that have signatures matching exactly to what there was before, so they will work with a previously compiled DLL.

Fixes KSP-KOS#2861 by replacing ProcessOneInputChar()'s use of
defaulted optional parameters with just having different
explicit signatures instead.  This way previously
compiled DLLs will pick the right one, which they cannot
do with defaulted args because in C# defaulted args are
appended at compile-time, not run-time or load-time. If the
signature required appending one extra optional arg back
when the compiler ran to build the caller's DLL, but it now
would need to append two such args, the DLL will still be
trying to get away with just appending one.  Thus why the
kOSPropMonitor DLL still insists on a 3-arg method existing
or it won't work.

tl;dr - adding more parameters but making them defaulted only
provides backward compatibility when all DLLs that call the
method are getting recompiled from scratch.  It doesn't when
the caller is a DLL that's not being recompiled.
@Dunbaratu Dunbaratu added the enhancement Something new (not a bug fix) is being requested label Jan 28, 2021
@Dunbaratu Dunbaratu merged commit 81e0d93 into KSP-KOS:develop Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something new (not a bug fix) is being requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KosProp Monitor (input character in mfd don't work)
1 participant