Skip to content

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

@jgcodes2020

Description

@jgcodes2020

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions