ciao-lang/ciao

Ciao 1.24.0 WARNING: predicate user:clause/2 from user(...) is being redefined

Closed this issue · 6 comments

Trying to run Logtalk ciaolgt integration script generatesWARNING: predicate user:clause/2 from user(...) is being redefined for each loaded file:

$ ciaolgt
...
{Compiling /Users/pmoura/logtalk/scratch/monitoring_2069058937_9807_lgt.pl
WARNING: predicate user:clause/2 from user(/Users/pmoura/logtalk/scratch/expanding_2069058937_9807_lgt) is being redefined
WARNING: predicate user:clause/2 from user(/Users/pmoura/logtalk/scratch/expanding_2069058937_9807_lgt) is being redefined
}
{Compiling /Users/pmoura/logtalk/scratch/forwarding_2069058937_9807_lgt.pl
WARNING: predicate user:clause/2 from user(/Users/pmoura/logtalk/scratch/monitoring_2069058937_9807_lgt) is being redefined
WARNING: predicate user:clause/2 from user(/Users/pmoura/logtalk/scratch/monitoring_2069058937_9807_lgt) is being redefined
}
{Compiling /Users/pmoura/logtalk/scratch/user_2069058937_9807_lgt.pl
WARNING: predicate user:clause/2 from user(/Users/pmoura/logtalk/scratch/forwarding_2069058937_9807_lgt) is being redefined
WARNING: predicate user:clause/2 from user(/Users/pmoura/logtalk/scratch/forwarding_2069058937_9807_lgt) is being redefined
}
{Compiling /Users/pmoura/logtalk/scratch/logtalk_2069058937_9807_lgt.pl
WARNING: predicate user:clause/2 from user(/Users/pmoura/logtalk/scratch/user_2069058937_9807_lgt) is being redefined
WARNING: predicate user:clause/2 from user(/Users/pmoura/logtalk/scratch/user_2069058937_9807_lgt) is being redefined
}
{Compiling /Users/pmoura/logtalk/scratch/core_messages_2069058937_9807_lgt.pl
WARNING: predicate user:clause/2 from user(/Users/pmoura/logtalk/scratch/logtalk_2069058937_9807_lgt) is being redefined
WARNING: predicate user:clause/2 from user(/Users/pmoura/logtalk/scratch/logtalk_2069058937_9807_lgt) is being redefined
}
...

Looking into the files, they contain no definition for the user:clause/2 predicate. What could be causing these warnings?

jfmc commented

Thanks for the report. The iso_strict package is including now better support for clause/2, but unfortunately it does behave well with user files (i.e., not modules). We are working on a fix.

jfmc commented

Hi @pmoura, latest version (master, not tagged as release) simplifies and fixes treatment of clause/2 in iso_strict. Let me know if you can test it or prefer to wait for a release tag.

With the latest Ciao master, I still get:

{Loading /opt/local/share/logtalk/paths/paths.po
WARNING: predicate user:clause/2 from user(/opt/local/share/logtalk/adapters/ciao) is being redefined
WARNING: predicate user:clause/2 from user(/opt/local/share/logtalk/adapters/ciao) is being redefined
}
{Loading /opt/local/share/logtalk/core/core.po
WARNING: predicate user:clause/2 from user(/opt/local/share/logtalk/paths/paths) is being redefined
WARNING: predicate user:clause/2 from user(/opt/local/share/logtalk/paths/paths) is being redefined
}

Trying to load any Logtalk example also fails, which may or may not be related to the warnings above.

jfmc commented

Just in case there are some old bytecode files around, have you recompiled Ciao from a fresh checkout? If so I will try to reproduce and debug the problem on my own machine. The new implementation should not redefine clause/2.

After deleting the /Users/pmoura/.ciaoroot/master directory and rebuilding , I no longer get those warnings. Thanks. There's an incompatibility with the latest Logtalk stable release (3.85.0). Fixed in the latest git version.

jfmc commented

Great!! Thank you for the quick answer.