Giter VIP home page Giter VIP logo

Comments (5)

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

Thanks, I did not know about the -ignore_xref attribute. Will look into this.

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

Hmm... are you sure about the -ignore_xref attribute? I could not find anything about it neither in the docs nor in the source (looking at a slightly post-19.0 git tree of otp). Also tried it, but could not get it to work. (tried -ignore_xref(...) as you wrote, and also some variations like -xref({ignore,[id/2,...]) and -xref({ignore,id/2}))

After taking a peek into the xref_reader.erl, I got the following to work: -xref({encode_msg/2,id/2}). ie inserting a "fake" call edge from some known-to-exist function (encode_msg/2) to id/2. It appears to work, but I don't want to go this route, since it seems kludgy, the -xref attribute is experimental, and undocumented, so it could stop working away any time.

Will instead try to move forward by not generating unused functions, though the calculations for when they're needed are probably going to be a bit messy (I think) so might take a little time. Alternative ways such as marking helpers for use and generate only marked helpers might be a bit awkward too, due to the way the code is structured a the moment.

from gpb.

tsloughter avatar tsloughter commented on July 30, 2024

Ah, crap, -ignore_xref is part of rebar not xref...

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

Ah, I see

from gpb.

tomas-abrahamsson avatar tomas-abrahamsson commented on July 30, 2024

Hi, in just-pushed 3.26.1, only the actually used helper functions are included in the generated module, fixing this issue (closing).

from gpb.

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.