viniciusgerevini / godot-aseprite-wizard

Godot Editor plugin to help import Aseprite animations to AnimationPlayers, AnimatedSprites and SpriteFrames.
MIT License
893 stars 43 forks source link

Can not be used in Godot 3.2, Mix space and tab error occured. #2

Closed inkcomic closed 4 years ago

inkcomic commented 4 years ago

It seems that Godot has removed mix space and tab support in 3.2 ??? https://github.com/godotengine/godot/issues/30937

viniciusgerevini commented 4 years ago

Hello @inkcomic. I've been using it with Godot 3.2.2, and it's working fine. I've checked those files for mixed space/tab and I couldn't find any occurrence. Anyway, this issue seems to have been fixed on https://github.com/godotengine/godot/pull/32808

I'll try to run it against 3.2.3, to check for any issues.

Can you give me some extra information about the issue you are facing? When do you see this error? While instaling the plugin or importing a new file?

cimpresovec commented 4 years ago

I can also confirm that this is an issue in 3.2.3. The mentioned PR probably fixes this, but probably won't be available till the next hotfix release. The issue is when installing the plugin, since Godot can't even parse the plugin.gd file. I'd contribute a PR, but since tabs vs. spaces is a developer preference I'll leave this up to you.

inkcomic commented 4 years ago

Hello @inkcomic. I've been using it with Godot 3.2.2, and it's working fine. I've checked those files for mixed space/tab and I couldn't find any occurrence. Anyway, this issue seems to have been fixed on godotengine/godot#32808

I'll try to run it against 3.2.3, to check for any issues.

Can you give me some extra information about the issue you are facing? When do you see this error? While instaling the plugin or importing a new file?

Hi,@viniciusgerevini: I'm using Godot 3.2.3.stable.mono.official. Maybe it only happen in 3.2.3?

viniciusgerevini commented 4 years ago

Thanks for the info @cimpresovec @inkcomic .

but since tabs vs. spaces is a developer preference

Yeah, I wouldn't mind changing indentation, but I guess it woudn't really solve the problem, as the plugin shouldn't break regardless users indentation.

I noticed one thing. This issue only happens if tabs and spaces are mixed in the same file. I'm not able to make this issue happen only by installing the plugin, I need to change the file to break it. I haven't tested with the mono version, though.

Did you maybe change those files by accident? Or do you think there may be a step in the installation process which is breaking it?

viniciusgerevini commented 4 years ago

@inkcomic . If you are blocked by that, for now you can open all plugin's *.gd files in the editor and convert the indentation to tabs, by clicking the menu Edit -> Convert Indent to Tabs.

I'm looking for a way to disable this check for the plugin files, so it stop bothering you.

cimpresovec commented 4 years ago

I do have to confess one thing @viniciusgerevini. I installed the plugin from the Godot's internal AssetStore. I don't know which code is taken in that process. I didn't try by cloning the repository. The code that got pulled in that process contained mixed indentation in every .gd file so the Plugin broke immediately. I'm using Manjaro and Godot 3.2.3 non mono.

inkcomic commented 4 years ago

@inkcomic . If you are blocked by that, for now you can open all plugin's *.gd files in the editor and convert the indentation to tabs, by clicking the menu Edit -> Convert Indent to Tabs.

I'm looking for a way to disable this check for the plugin files, so it stop bothering you.

Hi @viniciusgerevini , Thank you for the replay, I did what you said, but seem 'Edit -> Convert Indent to Tabs` can't resolve the situation mix tab and space , it seems that godot only process tab indent or space indent, one of them. I both tried download&install from assetlibrary from godot and copy github repo maser version. both give me same mix space and space indent error...

viniciusgerevini commented 4 years ago

@cimpresovec yeah, that's weird. The code from asset library should be the same from this repo. That sounds like some weird edge case. Anyway, I'm taking your advice and I'll release a version with all tabs. Even though it doesn't really prevent the issue from happening, it should make it rarer, as tabs indents are the default in Godot.

@inkcomic that's a pity. Godot only complains when the mixed indent happens in the same file, so this should have worked. I hope my next version fix your issue.

Thank you both for taking your time to report and help me understand this issue. I really appreciate it.

The fix is already in master and I'll let you know as soon it lands in the asset library

viniciusgerevini commented 4 years ago

Hello. Version 1.0.1 is in the asset store, using tabs instead of spaces. It also includes better error message for when Aseprite command is misconfigured. Please, let me know if the error persists. :)

cimpresovec commented 4 years ago

The update fixed the issue on my side. Thank you @viniciusgerevini

inkcomic commented 4 years ago

Just installed from the assetlib, seems it work fine now :D thank you very much for your plugin. @viniciusgerevini