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

gtk4-macros: Blueprint sources should not include the using Gtk 4.0 declaration by default #1933

Closed
jgcodes2020 opened this issue Dec 4, 2024 · 1 comment · Fixed by #1939
Labels
bug Something isn't working

Comments

@jgcodes2020
Copy link

Bug description
The current implementation of Blueprint templates automatically prepends the declaration using Gtk 4.0;. This is part of Blueprint's syntax, and omitting it in a Blueprint file causes the language server to error out.

Fixing it is a simple one-line change in gtk4-macros/blueprint.rs, specifically deleting line 17 here:

let mut stdin = compiler.stdin.take().unwrap();
stdin.write_all(b"using Gtk 4.0;\n")?;
stdin.write_all(blueprint)?;
drop(stdin);

Obviously the tests need to be modified, but that's not a big problem.

Backtrace
N/A

@jgcodes2020 jgcodes2020 added the bug Something isn't working label Dec 4, 2024
@bilelmoussaoui bilelmoussaoui linked a pull request Dec 10, 2024 that will close this issue
@jgcodes2020
Copy link
Author

Seems like this was fixed, I'll close this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant