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

[server] Context.includeFile doesn't include file on the second compilation #7851

Open
nadako opened this issue Feb 23, 2019 · 5 comments
Open
Assignees
Labels
feature-compiler-cache platform-javascript Everything related to JS / JavaScript platform-lua Everything related to Lua test-needed
Milestone

Comments

@nadako
Copy link
Member

nadako commented Feb 23, 2019

Main.hx

class Main {
	static function __init__() haxe.macro.Compiler.includeFile("a.js");
}

a.js

// this is a.js

do

haxe --wait 7000
haxe --connect 7000 Main -js main.js

(a.js contents is included into the generated file)

do this again:

haxe --connect 7000 Main -js main.js

(a.js contents is NOT included into the generated file until Main.hx is invalidated)

@nadako
Copy link
Member Author

nadako commented Feb 23, 2019

This completely breaks e.g. Lua target as it uses file inclusion for some basic types like Array.

@nadako
Copy link
Member Author

nadako commented Feb 23, 2019

This completely breaks e.g. Lua target as it uses file inclusion for some basic types like Array.

Which is super unfortunate because vshaxe enables compilation server by default :-/

@nadako nadako added platform-lua Everything related to Lua platform-javascript Everything related to JS / JavaScript labels Feb 23, 2019
@nadako
Copy link
Member Author

nadako commented Feb 23, 2019

Looks like include_files was never cache-friendly, so this might require quite some refactoring...

Simn pushed a commit to Simn/haxe that referenced this issue Feb 24, 2019
…getClientHeadersMap(); switched haders names to uppercase in php.Web.getClientHeaders() (closes HaxeFoundation#7851)
@Simn Simn added this to the Design milestone May 22, 2019
@Simn
Copy link
Member

Simn commented Dec 30, 2023

I've just come across this when working on hxb and was quite confused that this isn't working. I think the solution here is to do something similar to what add_resource does, i.e. bind the include to the current module.

@Simn Simn self-assigned this Dec 30, 2023
Simn added a commit that referenced this issue Dec 30, 2023
@Simn Simn added test-needed and removed bug labels Dec 30, 2023
@Simn
Copy link
Member

Simn commented Dec 30, 2023

This works now, still need a test.

0b1kn00b pushed a commit to 0b1kn00b/haxe that referenced this issue Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-compiler-cache platform-javascript Everything related to JS / JavaScript platform-lua Everything related to Lua test-needed
Projects
None yet
Development

No branches or pull requests

2 participants