Skip to content

Conversation

@dobesv
Copy link
Contributor

@dobesv dobesv commented Mar 29, 2025

Assuming that every file in the target directory is an output to be cached doesn't seem correct here - if they didn't specify outputs, assume there are none instead.

dobesv added 2 commits April 18, 2025 21:21
… outputs

Assuming that every file in the target directory is an output to be cached doesn't seem correct here - if they didn't specify outputs, assume there are none instead.
@dobesv dobesv force-pushed the default-outputs-glob-empty branch from 9cbdad5 to 72f3c63 Compare April 19, 2025 04:22
Copy link
Member

@ecraig12345 ecraig12345 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, but this seems like a risky change since outputs and outputGlob are both optional, and there's no config validation error if neither is defined. So it's changing from implicitly caching (probably) too much to implicitly caching nothing--neither behavior is great, but at least outside a major bump I think it's safer to preserve what's done today.

@dobesv
Copy link
Contributor Author

dobesv commented Jan 24, 2026

The current behavior seems broken to me. But it's up to you I guess. I have a workaround in place.

Or are you saying I should update the pull request to do a major version bump?

1 similar comment
@dobesv
Copy link
Contributor Author

dobesv commented Jan 24, 2026

The current behavior seems broken to me. But it's up to you I guess. I have a workaround in place.

Or are you saying I should update the pull request to do a major version bump?

@ecraig12345
Copy link
Member

The current behavior seems broken to me. But it's up to you I guess. I have a workaround in place.

Or are you saying I should update the pull request to do a major version bump?

I agree it's weird, but it's too significant of a change in default behavior outside a major version bump. It's also unfortunate that the doc comments inherited from backfill say the default is lib/**/*, but that doesn't appear to be true with the way lage sets up the config, and isn't a good assumption anyway since not everyone uses that output structure.

Probably the "right" approach in the next major version is to make cacheOptions.outputGlob and probably .environmentGlob required, since the behavior without either of those options is pretty bad/unexpected and defeats a significant part of the purpose of using lage. Lage is widely used enough that we don't want to bump the major version for just one change, but we probably will need a major bump due to Node version requirements in the near-ish future, so maybe this could be done at that time.

@dobesv
Copy link
Contributor Author

dobesv commented Jan 28, 2026 via email

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.

2 participants