Skip to content

Conversation

@andrewmw94
Copy link

Cleanup StrataMain python commands

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@andrewmw94 andrewmw94 requested a review from a team as a code owner December 16, 2025 15:48
(cd ../../../Tools/Python && python -m strata.gen py_to_strata "../../StrataTest/Languages/Python/$test_file" "../../StrataTest/Languages/Python/$ion_file")

output=$(cd ../../.. && lake exe strata pyAnalyze --include Tools/Python/test_results/dialects "StrataTest/Languages/Python/${ion_file}" 0)
output=$(cd ../../.. && lake exe strata pyAnalyze --include Tools/Python/test_results/dialects "StrataTest/Languages/Python/${ion_file}")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think --include isn't necessary because the Python dialect must have been already included in Strata during compilation. Do you want to check whether removing this works?

let (sp, args) ← process {} #[] remainingArgs
if p : args.size = cmd.args.length then
cmd.callback sp ⟨args, p⟩
match cmd.flagsCallback with
Copy link
Contributor

Choose a reason for hiding this comment

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

flagsCallback seems overly specific to me. How about we having a generic callback that takes the remaining args as a list of strings? and the functionality between lines 214 and 240 are moved into a standalone function that each callback can invoke?

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.

4 participants