Giter Site home page Giter Site logo

Comments (7)

rvanasa avatar rvanasa commented on August 23, 2024 1

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.

letmejustputthishere avatar letmejustputthishere commented on August 23, 2024 1

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.

rvanasa avatar rvanasa commented on August 23, 2024 1

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.

ggreif avatar ggreif commented on August 23, 2024

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.

letmejustputthishere avatar letmejustputthishere commented on August 23, 2024

yes, but then i have to generate the motoko bindings from the did file which adds friction

from vscode-motoko.

rvanasa avatar rvanasa commented on August 23, 2024

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.

letmejustputthishere avatar letmejustputthishere commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.