-
Notifications
You must be signed in to change notification settings - Fork 123
Minifier causing errors when code had no errors before. #199
Comments
I'm guessing it's because it's a static class function. Comes out as:
but reference is not (obviously) using the minified name. Also, the code generated is not a crazy minified as I'm used to.. |
Hmm. the CODE tagging removes some of the white space.. hrmph. |
So you think it could be just an issue with static methods? That's a fairly easy fix if that's the case. I'll just turn them all into standard methods as I can find an instantiated version of the classes in all cases. |
I have tested that, I removed all static methods, turning them into standard ones. This didn't help I'm afraid, it seems to be an issue with standard methods too. |
Interesting. All I did was run a Resharper Cleanup Code on your project... and it generated correctly. There is something about the way you write your code that is nonstandard. |
I'm sorry I don't have the energy to figure out the details of how and why this works... but it does. Enclosing the fixed project. Maybe you can figure it out yourself? Or someone else interested? |
Thanks for the fixed files. Thanks for your time on this Malware and Wicorel. |
I may have a guess as to what is going on. I started out writing my script using classes nested in partial class Program definitions, as I thought this was necessary to work in the programmable block. After running into inconsistent accessibility issues and reading another thread, I learned this was not necessary and refactored my code to put all my base classes into the namespace. But I forgot to remove the partial class declaration from the actual Program.cs. Resharper caught that this was the only declaration of Program and thus the partial designation was not required and removed it. So my best guess is that declaring a class as partial but then not actually having partial implementations is throwing of the brace placement in the minified code. |
Closing because this site is being archived due to complete replacement at https://github.com/malforge/mdk2. If issue persist, please create new issue there. |
The code didn't initially have errors when compiling in SE. However when I compile in SE after minification, lots of errors appear:
These errors seem to be nearly all methods not found. Perhaps it isn't minifying method names where it should?
MDK project here if you wanna take a quick snoop to see if I'm doing something wrong:
https://github.com/ksqk34/Autodocking-2
The text was updated successfully, but these errors were encountered: