Skip to content

[bug] Config file changes not reflected when using PKL imports #1973

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
rnza0u opened this issue May 17, 2025 · 1 comment
Open

[bug] Config file changes not reflected when using PKL imports #1973

rnza0u opened this issue May 17, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@rnza0u
Copy link

rnza0u commented May 17, 2025

Describe the bug

It seems that moon is not detecting configuration changes when modifying a file that is imported from elsewhere in PKL.

Steps to reproduce

Create a PKL configuration file for any project, or for the workspace (project/moon.pkl or .moon/workspace.pkl).

Create an imported file called imported.pkl that contains some moon configuration options. And import it into your main configuration file (using either import, amends or extends in PKL).

Run anything that's contained in the config. Then add change to imported.yml.

Re-run the target, changes are not reflected and the old configuration is used.

When using --cache write or --cache off, it works. It also works when we modify the main moon.yml file. So apparently moon cache system only checks for changes on this file.

Maybe configuration files cache should be disabled when using PKL files ? Or maybe moon should somehow detect if other files are imported (that sounds more difficult).

Expected behavior

When modifying imported.pkl, moon should pick up the changes.

Environment

Linux 64 bits (Ubuntu)
I am using pkl in version 0.28.2

btw, I don't know if you remember me, we had a little chat on reddit last year. i also wrote a monorepo tool in Rust. I am currently trying moon and it's been great so far ! so cheers

@rnza0u rnza0u added the bug Something isn't working label May 17, 2025
@milesj
Copy link
Collaborator

milesj commented May 17, 2025

Nice report. This is definitely a lack of surface area on moon's part. I'm not sure how to solve this without actually reading and manually parsing these .pkl files somehow.

The problem is that the files are passed to the pkl binary and evaluated behind the scenes, outside the context of moon.

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

No branches or pull requests

2 participants