Skip to content

Conversation

@seanyeh
Copy link
Contributor

@seanyeh seanyeh commented Nov 14, 2025

eval/eval.go Outdated
rotatePaths map[string]bool,
) (*esc.Environment, RotationResult, syntax.Diagnostics) {
if env == nil || (len(env.Values.GetEntries()) == 0 && len(env.Imports.GetElements()) == 0) {
if env == nil || (len(env.Values.Entries) == 0 && len(env.Imports.GetElements()) == 0) {
Copy link
Member

Choose a reason for hiding this comment

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

is there not a GetEntries method on *ObjectExpr? if there isn't, I think we probably need a nil check here (the original GetEntries check would check for a nil receiver and return an empty slice)

@seanyeh seanyeh force-pushed the syeh/ranges-top-level-objectexpr branch from df8d4d6 to ec8fa2c Compare November 19, 2025 17:03
@seanyeh
Copy link
Contributor Author

seanyeh commented Nov 21, 2025

Unfortunately this causes some changes that aren't quite backwards-compatible so we're putting a hold on this for now - will revisit with a possibly different approach

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