Skip to content
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

Invalid compile result confuses IDE #254

Closed
vbar opened this issue Jul 19, 2022 · 3 comments · Fixed by #256
Closed

Invalid compile result confuses IDE #254

vbar opened this issue Jul 19, 2022 · 3 comments · Fixed by #256

Comments

@vbar
Copy link
Collaborator

vbar commented Jul 19, 2022

Consider the hook exporting an extra function:

#include "hookapi.h"

void t()
{
    TRACESTR("starter.c: Called.");
}

int64_t hook(uint32_t reserved ) {
    t();
    accept (0,0,0); 

    _g(1,1);   // every hook needs to import guard function and use it at least once
    return 0;
}

Language Server (correctly) reports hooks-entry-points-neg error on it, which (unfortunately) doesn't prevent compilation (see #126). Compiler backend reports success (which is also incorrect and probably should be a bug against https://github.com/XRPLF/hook-cleaner-c ) but produces invalid Wasm, leading the Hooks Builder to show a link to deploy, although the deploy tab still says "You haven't compiled any files yet, compile files on develop view." Hooks Builder should report when it cannot parse received Wasm.

@muzam1l
Copy link
Collaborator

muzam1l commented Jul 21, 2022

Compiler backend reports success

It's bug inside compile function in ide, will fix it soon.

@muzam1l
Copy link
Collaborator

muzam1l commented Jul 21, 2022

probably should be a bug against https://github.com/XRPLF/hook-cleaner-c

Maybe, because it produces invalid wasm with success result, but we can fix it on our end too.

@vbar
Copy link
Collaborator Author

vbar commented Jul 21, 2022

probably should be a bug against https://github.com/XRPLF/hook-cleaner-c

Maybe, because it produces invalid wasm with success result, but we can fix it on our end too.

yes, belt and suspenders :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants