Skip to content

location: rename FLAG_STREAM as FLAG_SIDEEFFECTS - #501

Open
omar-polo wants to merge 1 commit into
mainfrom
op/side-effects
Open

location: rename FLAG_STREAM as FLAG_SIDEEFFECTS#501
omar-polo wants to merge 1 commit into
mainfrom
op/side-effects

Conversation

@omar-polo

Copy link
Copy Markdown
Contributor

stream was a bad name, as it doesn't really imply the fact that it's not safe to call the importer twice to gather some statistics.

Strictly speaking, all integrations have side effects, even just a network connection is, but it conveys better the idea of "spooky action at a distance" happening.

For backward compatibility, add an alias for FLAG_STREAM to FLAG_SIDEEFFECTS and also make ParseFlag accept the new name.

Copilot AI review requested due to automatic review settings July 22, 2026 14:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR renames the importer flag FLAG_STREAM to FLAG_SIDEEFFECTS to better communicate that the importer is not safe to run multiple times for gathering statistics, while maintaining backward compatibility via an alias and parser support.

Changes:

  • Introduce FLAG_SIDEEFFECTS as the new flag name and keep FLAG_STREAM as an alias for compatibility.
  • Update ParseFlag to accept "sideeffects" (and continue accepting "stream").

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread location/location.go Outdated
Comment thread location/location.go Outdated
stream was a bad name, as it doesn't really imply the fact that it's
not safe to call the importer twice to gather some statistics.

Strictly speaking, all integrations have side effects, even just a
network connection is, but it conveys better the idea of "spooky
action at a distance" happening.

For backward compatibility, add an alias for FLAG_STREAM to
FLAG_SIDEEFFECTS and also make ParseFlag accept the new name.
Copilot AI review requested due to automatic review settings July 22, 2026 16:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread location/location.go
Comment on lines +127 to +128
case "sideeffects", "stream":
return FLAG_SIDEEFFECTS, nil
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.

3 participants