Code Monkey home page Code Monkey logo

gdscript-preprocessor's People

Contributors

dalexeev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

boyquotes

gdscript-preprocessor's Issues

Build crashes with GDSPP turned on

I tried an executable build and it just crashes on loading a scene with the plugin enabled, the executable works if I turn the plugin off though. I've not done much building with godot yet so I need to figure out how to debug executables, but it seems strange it would do this as it should only be stripping comments?

code not being stripped

So I have the follow code:

func _ready() ->void:
	#~if OS.is_debug_build()
	var c = 0
	var b = 0;
	var is_debug = OS.is_debug_build()
	var t1 = Time.get_ticks_usec()
	
	while c < 1000000:
		if is_debug:
			b += 1
		else:
			b -= 1
		c += 1
		
	print(Time.get_ticks_usec() - t1)
	print(b)
	#~endif
	SignalManager.main_hud_action_selected.connect(on_main_hud_action_selected)
	SignalManager.main_hud_consumable_select.connect(on_main_hud_consumable_select)

but when I export the project with the Export With Debug unchecked and unpack the pck file, the code looks like this:

func _ready() ->void:
	var c = 0
	var b = 0;
	var is_debug = OS.is_debug_build()
	var t1 = Time.get_ticks_usec()
	while c < 1000000:
		if is_debug:
			b += 1
		else:
			b -= 1
		c += 1
	print(Time.get_ticks_usec() - t1)
	print(b)
	SignalManager.main_hud_action_selected.connect(on_main_hud_action_selected)
	SignalManager.main_hud_consumable_select.connect(on_main_hud_consumable_select)

I am not sure why only comments are bring stripped out. I would expect the conditional block to be stripped. I did not change any of the setting in the export dialog and I restarted the editor after enabling the plugin to make sure that was good.

I also tried using #~if OS.has_feature("editor") (which I assume should be stripped regardless of it being in debug mode) and got the same result.

Replace print() with pass or replaced with ""?

Love this plugin, works really well when I tested with GodotRE. I was wondering, would it be possible to replace all print() with pass? This way, no print debug messages would be exported, but functions that use them wouldn't break. Either that, or all print("") strings could be cleared to ""?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.