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

Refactor Interpreter (to an Interface + Implementation Class) #594

Merged
merged 13 commits into from
Jun 25, 2024

Conversation

georg-schwarz
Copy link
Member

  • reduces amounts of parameters in the interpretation model by using object construction
  • defines a nicer interpreter interface that is easier to use
  • pulls out CLI runtime argument validation (should not be located in interpreter-lib)
  • introduces a default value for the --debug-target parameter to align with other params: use a default value over undefined

@georg-schwarz georg-schwarz changed the title Refactor Interpreter as a Class Refactor Interpreter (to an Interface + Implementation Class) Jun 20, 2024
Copy link
Contributor

@joluj joluj left a comment

Choose a reason for hiding this comment

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

The type guards currently don't do anything, this needs to be changed. The other stuff is optional.

apps/interpreter/src/run-options.ts Show resolved Hide resolved
apps/interpreter/src/run-action.ts Outdated Show resolved Hide resolved
apps/interpreter/src/run-options.ts Outdated Show resolved Hide resolved
apps/interpreter/src/run-options.ts Outdated Show resolved Hide resolved
libs/interpreter-lib/src/interpreter.ts Outdated Show resolved Hide resolved
@georg-schwarz georg-schwarz requested a review from joluj June 21, 2024 10:58
Copy link
Contributor

@joluj joluj left a comment

Choose a reason for hiding this comment

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

That one comment does not make sense anymore. Otherwise looks good

!isParseOnlyArgument(options.parseOnly, logger)
) {
return undefined;
}

// TypeScript does not infer type from type guards, probably fixed in TS 5.5
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment should be removed

@georg-schwarz georg-schwarz merged commit f4db0fe into main Jun 25, 2024
3 checks passed
@georg-schwarz georg-schwarz deleted the refactor-interpreter-as-a-class branch June 25, 2024 13:14
@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants