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

A library's addDefine gets ignored #204

Open
XANOZOID opened this issue Aug 4, 2019 · 1 comment
Open

A library's addDefine gets ignored #204

XANOZOID opened this issue Aug 4, 2019 · 1 comment
Assignees

Comments

@XANOZOID
Copy link
Contributor

XANOZOID commented Aug 4, 2019

Basically, I was able to test that my flags were being ignored when they were declared in an added library.

The library khafile.js

let project = new Project('tests');
project.addDefine('hxp_test_message_lib');

resolve(project);

The project khafile.js

let project = new Project('tests');
project.addDefine('hxp_test_message');
project.addLibrary('HaxePunk');
resolve(project);

Theoretical haxe file:

class App 
{

	public static function main() 
	{
		#if (hxp_test_message)
				trace("message from project");
		#end
		#if (hxp_test_message_lib)
				trace("message from lib");
		#end
		System.start({title: "Project", width: 1024, height: 768, framebuffer: {frequency: 60}}, function(window)
		{
			// . . .
		});
	}
}

The output ignores the library's define, but it registers the projects own flag.

@XANOZOID
Copy link
Contributor Author

XANOZOID commented Aug 4, 2019

Correction, as clarified in the IRC I was using addLibrary incorrectly. addProject is the functionality I'm looking for, but it doesn't fallback to Haxelib projects - which I actually want. So I'll be making a pull-request that takes care of this use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant