-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Set default circomspect library paths when versions allow #116
Conversation
@@ -32,6 +32,7 @@ const currentDirectoryPath = path.dirname(currentFilePath); | |||
*/ | |||
export function checkCommandExists(command: string): Promise<boolean> { | |||
return new Promise((resolve) => { | |||
// TODO: Circomspect doesn't support this argument, so this will always fail for that command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unrelated bug, I'll make a followup ticket.
@@ -130,7 +131,10 @@ export async function execCommand( | |||
`"${process.env.SINDRI_FORCE_DOCKER}".`, | |||
); | |||
} else if (await checkCommandExists(command)) { | |||
logger?.debug(`Executing the "${command}" command locally.`); | |||
logger?.debug( | |||
{ args, command }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and below are just making the logging more useful by including the command arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Circomspect added support for a
-L
/--library
search path flag in analogy to Circom's-l
argument (as of trailofbits/circomspect#21) that we use on the backend with defaults of the project root and thenode_modules
subdirectory. This PR updates thesindri lint
command to check whether the current Circomspect version supports the argument, and then to specify the same search paths if the argument is supported. We'll probably end up making the search paths configurable, but this makes the backend consistent withsindri lint
in the meantime.For testing it manually, you can run
docker compose up -d docker compose exec sindri-js bash
on the latest branch, change into a directory with one of our example Circom circuits that has been failing linting, and then run:
to make sure that things work as expected.