monarch-initiative / mondo-ingest

Coordinating the mondo-ingest with external sources
https://monarch-initiative.github.io/mondo-ingest/
6 stars 3 forks source link

Silence certain `make` warnings #541

Open joeflack4 opened 1 month ago

joeflack4 commented 1 month ago

Overview

Whenever I run a goal, I get a bunch of warnings at first which makes things hard to read. Any way to silence?

e.g.:

mmake2 ../mappings/mondo-sources-all-lexical.sssom.tsv
--- Using IMP=false COMP=false MIR=false ---
Running obolibrary/odkfull:dev with '-Xmx20G' as options for ROBOT and other Java-based pipeline steps.
make: Entering directory '/work/src/ontology'
mondo-ingest.Makefile:65: warning: overriding recipe for target 'components/omim.owl'
Makefile:522: warning: ignoring old recipe for target 'components/omim.owl'
mondo-ingest.Makefile:77: warning: overriding recipe for target 'components/ordo.owl'
Makefile:536: warning: ignoring old recipe for target 'components/ordo.owl'
mondo-ingest.Makefile:95: warning: overriding recipe for target 'components/ncit.owl'
Makefile:508: warning: ignoring old recipe for target 'components/ncit.owl'
mondo-ingest.Makefile:105: warning: overriding recipe for target 'components/doid.owl'
Makefile:438: warning: ignoring old recipe for target 'components/doid.owl'
mondo-ingest.Makefile:124: warning: overriding recipe for target 'component-download-icd10cm.owl'
Makefile:462: warning: ignoring old recipe for target 'component-download-icd10cm.owl'
mondo-ingest.Makefile:130: warning: overriding recipe for target 'components/icd10cm.owl'
Makefile:466: warning: ignoring old recipe for target 'components/icd10cm.owl'
mondo-ingest.Makefile:142: warning: overriding recipe for target 'components/icd10who.owl'
Makefile:480: warning: ignoring old recipe for target 'components/icd10who.owl'
mondo-ingest.Makefile:153: warning: overriding recipe for target 'components/icd11foundation.owl'
Makefile:494: warning: ignoring old recipe for target 'components/icd11foundation.owl'
mondo-ingest.Makefile:164: warning: overriding recipe for target 'components/gard.owl'
Makefile:452: warning: ignoring old recipe for target 'components/gard.owl'
mondo-ingest.Makefile:169: warning: overriding recipe for target 'mondo-ingest-full.owl'
Makefile:672: warning: ignoring old recipe for target 'mondo-ingest-full.owl'
mondo-ingest.Makefile:610: warning: overriding recipe for target 'help'
Makefile:746: warning: ignoring old recipe for target 'help'
joeflack4 commented 1 month ago

@matentzn @twhetzel I haven't tried google / ChatGPT yet but wondering if you have any idea or opinion?

matentzn commented 1 month ago

I would caution against silencing as they might reveal some important thing (where a goal in mondo-ingest.Makefile was erroneously overwritten). I do agree it's verbose and annoying to see this all the time, but the advantages for debugging outweigh the verbosity concerns imo

twhetzel commented 1 month ago

I tried a few things, sh run.sh make build-mondo-ingest 2>error_log.txt and sh run.sh make -s -B build-mondo-ingest, but neither silenced the initial lines from the make command.

What issue are these initial lines from the make command causing where it hard to read or were the lines in the initial issue post just an example of lines of interest to suppress?

Overall from the make docs (https://www.gnu.org/software/make/manual/make.html):

‘warning: ignoring old recipe for target `xxx'’
GNU make allows only one recipe to be specified per target (except for double-colon rules). If you give a recipe for a target which already has been defined to have one, this warning is issued and the second recipe will overwrite the first.

Given the number of warnings from the sh run.sh make build-mondo-ingest and other issues, until these can be reviewed in more depth I am hesitant to silence these lines for now.

joeflack4 commented 1 month ago

Thanks for looking into this Trish, that is helpful.

Yes, this is about these particular warnings that I put in the OP being the point of annoyance. Those are the only ones I want to silence. Out of these options:

a. silence all warnings b. silence all warnings of type warning: overriding recipe c. silence only those very specific instances of those warnings that I show in the OP

I was thinking (b), and, at least for my local development, I would probably not mind doing (b). I didn't make it clear, but I did not mean to suggest we silence anything when it comes to builds. So I guess if there is a solution for this, maybe it's not correct for it to be a mondo-ingest issue; maybe I just need to write something in my .bash_profile.

In any case, I just thought of (c), which is even more preferable, and I actually wouldn't mind silencing these particular warnings for the build. But I doubt that would be possible.