Skip to content

Eliminate ProgramOptions.ConfigFileName #976

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

Merged
merged 2 commits into from
May 29, 2025

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented May 29, 2025

This is from back when the CLI was hacked-up. Now there's no reason to have it.

Copy link
Contributor

@Copilot Copilot AI left a comment

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 removes the vestigial ProgramOptions.ConfigFileName and refactors configuration parsing by introducing tsoptions.GetParsedCommandLineOfConfigFile, shifting the responsibility for reading and parsing the config file outside of the Program creation.

  • Removed old ConfigFileName handling from various packages.
  • Updated all callers to use tsoptions.GetParsedCommandLineOfConfigFile and NewProgramFromParsedCommandLine.
  • Cleaned up legacy code paths in program.go and associated tests.

Reviewed Changes

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

Show a summary per file
File Description
internal/tsoptions/utilities.go Added GetParsedCommandLineOfConfigFile to encapsulate config file reading and parsing
internal/execute/watcher.go Updated call to use the new tsoptions.GetParsedCommandLineOfConfigFile function
internal/execute/tsc.go Replaced legacy config file parsing call with the new function
internal/compiler/program_test.go Updated tests to use the new config parsing API
internal/compiler/program.go Removed ConfigFileName and legacy parsing logic; now directly uses RootFiles
internal/checker/checker_test.go Updated tests to use NewProgramFromParsedCommandLine

@jakebailey jakebailey added this pull request to the merge queue May 29, 2025
Merged via the queue into main with commit 011f524 May 29, 2025
23 checks passed
@jakebailey jakebailey deleted the jabaile/program-options-remove-config-file branch May 29, 2025 19:48
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