-
Notifications
You must be signed in to change notification settings - Fork 38
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 support for \ in function names #2715
Comments
Note: Since submitting #1561 deployArgs in cansiter_arb.ts has been split and renamed to initArgs and postUpgradeArgs. |
It turns out that azle already supported method names with @query([], undefined, { hidden: true })
'quoted\\Query'(): void {
console.log('This is a query function');
} dfx canister call query quoted\\Query this works perfectly well. One small fly in the ointment is that error: parser error
┌─ .azle/query/query.did:2:11
│
2 │ quoted\Query: () -> () query;
│ ^ Unknown token \
Error: Candid parser error: Unknown token \ at 27..28
Caused by:
Unknown token \ at 27..28 So from here we need to figure out if the candid parser intends for that to break, or if it's a bug. And then we need to decide if we are going to support it or not. |
Looking more closely at the candid spec it seems they do have a way to handle this; by putting the identifier in a string. So this works
while this is invalid
So we have a problem with how we are outputting the candid |
should result in
But instead we get
|
In the process of resolving #1561 we discovered that function names can have
\
in them. So we need to:"canister-id".crazyFunctionName
The text was updated successfully, but these errors were encountered: