Skip to content

Delete compile file after compilation#5375

Open
ankddev wants to merge 9 commits intogleam-lang:mainfrom
ankddev:delete-compile-file-after-compilation
Open

Delete compile file after compilation#5375
ankddev wants to merge 9 commits intogleam-lang:mainfrom
ankddev:delete-compile-file-after-compilation

Conversation

@ankddev
Copy link
Contributor

@ankddev ankddev commented Feb 19, 2026

Closes #4474. I hope that it's right place to place, but I'm not sure, since why error while deleting file should fail the entire run?


  • The changes in this PR have been discussed beforehand in an issue
  • The issue for this PR has been linked
  • Tests have been added for new behaviour
  • The changelog has been updated for any user-facing changes

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Few tiny things inline

@lpil lpil marked this pull request as draft February 25, 2026 18:13
@ankddev ankddev force-pushed the delete-compile-file-after-compilation branch from 548cbfd to 1171d53 Compare February 26, 2026 04:31
Comment on lines +136 to +139
pub fn compilation_escript_path(out: &Utf8Path) -> Utf8PathBuf {
out.join(ARTEFACT_DIRECTORY_NAME).join("gleam@@compile.erl")
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lpil I've moved this function to paths module. I've thought about placing it under ProjectPaths, but BeamCompiler and its callers don't receive ProjectPaths, they receive just out, so this would require some refactoring. What are your thoughts?

@ankddev ankddev requested a review from lpil February 26, 2026 04:40
@ankddev ankddev marked this pull request as ready for review February 26, 2026 04:57
@ankddev
Copy link
Contributor Author

ankddev commented Feb 27, 2026

Oh, it seems that I forgot to add a changelog entry, will do it!

@ankddev
Copy link
Contributor Author

ankddev commented Feb 27, 2026

It's done now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't put gleam@@compile.erl in the _gleam_artefacts dir

2 participants