motoko-bootcamp / reboot

Can we self-organize?
https://www.openinternetsummer.com/
6 stars 5 forks source link

warning [M0195], this function call implicitly requires `system` capability - solution #1

Closed testpuddle closed 5 months ago

testpuddle commented 5 months ago

User-defined functions must now declare an explicit system pseudo-type parameter if they require system capabilities.

I went and read the info about the warning after our unconference call and so I am passing this along.

Line 19:

let daily = Timer.recurringTimer(#nanoseconds(nanosecondsPerDay), _kill);

to

let daily = Timer.recurringTimer(#nanoseconds(nanosecondsPerDay), _kill);

seb-icp commented 5 months ago

What is the difference? I'm guessing you forgot some syntax here

testpuddle commented 5 months ago

Strange... when I edit it it has the correct entry that I put. let daily = Timer.recurringTimer(#nanoseconds(nanosecondsPerDay), _kill);

It will not show it here!!!! Amazing. I have to delimited it for github.

let daily = Timer.recurringTimer\<system>(#nanoseconds(nanosecondsPerDay), _kill);

seb-icp commented 5 months ago

Great, thank you Ted. I've just made a PR to include that.