Comments (7)
Here is a workaround which we use in the base library (source code):
actor class Main() {
let Management = (actor "aaaaa-aa" : actor {
raw_rand : () -> async Blob;
});
public func greet(name : Text) : async Text {
ignore await Management.raw_rand();
return "Hello, " # name # "!";
};
};
I'll see if there's any way we can solve this within the VS Code extension; otherwise it might be necessary to fix this in dfx or the Motoko compiler.
Update: it sounds as though there are already plans to address this on the replica end. I'll keep an eye on this in case anything else is needed from the extension.
from vscode-motoko.
thanks for the workaround. another way of solving this without having to rewrite the management canister interface is to simply copy the aaaaa-aa.did
to .dfx/local/lsp
from vscode-motoko.
Thanks for the link! I set up a script to regenerate the Candid file from this URL before packaging the extension (#265).
from vscode-motoko.
Some projects just check in the IC.mo
file like this: https://github.com/sonicdex/motoko-token-canister/blob/main/src/token/Cap.mo#L9
from vscode-motoko.
yes, but then i have to generate the motoko bindings from the did file which adds friction
from vscode-motoko.
The extension now uses a default management canister Candid file as of v0.15.0. This should resolve the issue; otherwise, let me know and I'll take another look.
from vscode-motoko.
hey @rvanasa, i see your hardcoding the management canister did. is there a way to include it via git submodules or smth similar? i just recently opened a PR there to make working with it a bit more convenient
from vscode-motoko.
Related Issues (20)
- 100% CPU load with this extension HOT 10
- Do you support showing an outline? HOT 1
- performance improvements HOT 8
- extension don't see mops packages HOT 8
- multi line strings HOT 2
- extension does not recognize canister alias when project is in subdirectory HOT 5
- keyword `catch` is not highlighted HOT 1
- [Request] Please add option to disable context menu "Motoko: Deploy (20 Minutes)" HOT 2
- How to disable autoformating of comments? HOT 3
- Import can't find files HOT 9
- Continuous "Reference not found from AST node:" errors HOT 5
- Motoko deploy command ERROR HOT 2
- No wigglies on https://github.dev HOT 2
- No wigglies on https://github.dev HOT 1
- Language server not working/Heap out of memory HOT 8
- Error while importing a canister HOT 19
- Cannot find module '@napi-rs/lzma-linux-x64-gnu' in WSL HOT 2
- Autocomplete non-functional. HOT 2
- Feature Request: Data type on variable hover HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-motoko.