Giter VIP home page Giter VIP logo

Comments (3)

cmungall avatar cmungall commented on June 14, 2024

It would be a shame to write our own; even though it would be simple, it's nice having a unified mechanism for the case where we may want to combine external prolog programs with debug directives into the rulebase for a makefile.

There are a few things we can try. It should be possible to intercept messages. But first have a look at the PR I'm about to do that 'declares' debug topics as a top-level directive. See also my comments here: http://eu.swi-prolog.org/pldoc/man?predicate=debug/1

For this strategy we have an option of doing this modularly, with each topic declared in the relevant module. I opted for this. The annoying exception is for the md5 topic, this module is loaded dynamically at runtime, so we need to make sure the topic is declared in advance.

It may be simpler to simply aggregate all nodebug/1 directives in cli.pl or biomake.pl. Or even a separate debug_topics.pl module. YMMV.

from biomake.

ihh avatar ihh commented on June 14, 2024

this works for me

from biomake.

JanWielemaker avatar JanWielemaker commented on June 14, 2024

The rationale is that, as the code is compiled, debug/3 calls in the code register the topic. This requires
library(debug) to be loaded before loading code that uses debug/3. Now you get warnings if you use
?- debug(topic) from the command line. Not if you put it at the start of your source file.

I don't know what is going wrong here, but one option is to add the line below, which will silence
the warning.

user:message_hook(debug_no_topic(_Topic), _Type, _Lines).

from biomake.

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.