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

Strange behaviour with package includes #916

Open
philpax opened this issue Sep 19, 2023 · 2 comments
Open

Strange behaviour with package includes #916

philpax opened this issue Sep 19, 2023 · 2 comments
Assignees
Labels
bug Something isn't working topic:packages Package and package semantics. Dependencies, definitions, etc.
Milestone

Comments

@philpax
Copy link
Contributor

philpax commented Sep 19, 2023

Reported by didey on Discord - a package with

[package]
id = "tlyvg31cph82qlpeheiqum2exwsn9sb4"
name = "wb"
version = "0.0.1"
content = { type = "Playable" }
ambient_version = "0.3.0-dev"

[includes]
player = "src/player/ambient.toml"

and

[package]
id = "player"
name = "player"
version = "0.0.1"
content = { type = "Asset", schema = true }
ambient_version = "0.3.0-nightly-2023-09-18"

[components.vertical_velocity]
type = "F32"
attributes = ["Debuggable", "Networked"]

[components.move_speed_modifier]
type = "F32"
attributes = ["Debuggable", "Networked"]

has strange effects with the Rust codegen.

For them, the macro generates an error with an invalid reference to the entity function - presumably due to a relative import gone wrong generated by the macro.

For me, I get the much stranger behaviour of our WASM not loading at all. Disabling the include allows the WASM to load.

Looking at the state of the semantic with cargo run -p ambient_package_semantic --example parse_manifest "project_path" > schema.txt
doesn't show anything amiss - the included scope is right where it should be - but it's tripping up something with the macro codegen.

@philpax philpax added bug Something isn't working topic:packages Package and package semantics. Dependencies, definitions, etc. labels Sep 19, 2023
@philpax philpax added this to the 0.3 milestone Sep 19, 2023
@philpax philpax self-assigned this Sep 19, 2023
@philpax
Copy link
Contributor Author

philpax commented Sep 22, 2023

Will retry after #931, which makes the id optional for includes

@FredrikNoren FredrikNoren modified the milestones: 0.3, 0.4 Sep 25, 2023
@FredrikNoren
Copy link
Contributor

Includes is kind of an edge case behaviour, don't think this is a showstopper for 0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working topic:packages Package and package semantics. Dependencies, definitions, etc.
Projects
None yet
Development

No branches or pull requests

2 participants