Skip to content

Typescript declarations are not emitted with existing build directory #4520

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

Open
daniellionel01 opened this issue Apr 29, 2025 · 3 comments · May be fixed by #4523
Open

Typescript declarations are not emitted with existing build directory #4520

daniellionel01 opened this issue Apr 29, 2025 · 3 comments · May be fixed by #4523
Labels
good first issue Good for newcomers help wanted Contributions encouraged priority:medium

Comments

@daniellionel01
Copy link

Given a gleam application with target = "javascript" will build the application just fine. However when I enable typescript_declarations = true in the gleam.toml config and build the project again, the .d.ts are not emitted until I rm -rf the build directory that was emitted without the declarations turned on.


gleam v1.10.0
runtime: javascript

@lpil
Copy link
Member

lpil commented Apr 29, 2025

Good find! Let's reset the build directory when this configuration changes.

@lpil lpil added help wanted Contributions encouraged good first issue Good for newcomers priority:medium labels Apr 29, 2025
@daniellionel01
Copy link
Author

Good find! Let's reset the build directory when this configuration changes.

Cool! Yeah I'd be happy to work on this. I looked around in the build directory, but was not able to find any indication that we already store the settings or gleam.toml file used for that build. Since we'll somehow have to be able to know what configuration that was used in the build directory to be able to diff the new gleam.toml config.

Would it be fine to just cp the gleam.toml into the build directory and implement a diffing logic at the start of the build command?

@lpil
Copy link
Member

lpil commented Apr 29, 2025

Let's store only the config that we need to diff in a file in the build directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Contributions encouraged priority:medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants