Skip to content
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

Add stdin to driver's streams, and refactor stream passing #4812

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Jan 15, 2025

The language server needs stdin, and for tests we should be passing it around. My intent is to pass in a faux stdin to Driver for language server tests.

As long as I'm adding a new parameter, I was looking at also changing the way streams are passed in to Driver for style (pointers since they're held past construction lifetime). Since these are all stored in DriverEnv, I thought it might be a net improvement to use the struct directly, getting more explicit parameter names and also removing the need for SetFuzzing.

I'm trying here to avoid functional changes, but there are a couple additional fixes like removing an obsolete find_insensitive and refactoring how ValidateOptions handles errors (because it reduces the number of spots that operate on error_stream).

Copy link
Contributor

@chandlerc chandlerc left a comment

Choose a reason for hiding this comment

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

Nice!

@jonmeow jonmeow enabled auto-merge January 21, 2025 16:47
@jonmeow jonmeow added this pull request to the merge queue Jan 21, 2025
Merged via the queue into carbon-language:trunk with commit 4f02441 Jan 21, 2025
8 checks passed
@jonmeow jonmeow deleted the lsp-pipes branch January 21, 2025 17:26
dwblaikie pushed a commit to dwblaikie/carbon-lang that referenced this pull request Jan 21, 2025
…nguage#4812)

The language server needs stdin, and for tests we should be passing it
around. My intent is to pass in a faux stdin to Driver for language
server tests.

As long as I'm adding a new parameter, I was looking at also changing
the way streams are passed in to Driver for style (pointers since
they're held past construction lifetime). Since these are all stored in
DriverEnv, I thought it might be a net improvement to use the struct
directly, getting more explicit parameter names and also removing the
need for `SetFuzzing`.

I'm trying here to avoid functional changes, but there are a couple
additional fixes like removing an obsolete `find_insensitive` and
refactoring how `ValidateOptions` handles errors (because it reduces the
number of spots that operate on error_stream).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants