-
Notifications
You must be signed in to change notification settings - Fork 6
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
Seemingly mistaken "reference to unknown object: <object>" warning #8
Comments
The warning results from the plug-in compile an open file ( A possible solution is to compile individual files with the An alternative solution would be to always compile the loader file when any file in the project is opened or changed and saved. This second alternative may require some UI for the user to set the loader file for an open project. Although defaulting to |
Also this initial warning, seems to confuse the Linter, as all the following warnings are empty :( `refasModel.lgt:33: Warning: Reference to unknown object: list refasModel.lgt:46: Warning: |
The empty warnings are most likely a plug-in parsing issue. You can confirm by loading the file in a terminal. Please reply with the actual warnings so that we can diagnose where the parsing is failing. |
I can reproduce the empty warnings with the @arthwang Is it possible that a recent VSC update broke the plug-in? I don't remember having these issues in the past. I'm also noticing that syntax highlighting is wrong for some operators (e.g. |
Here are the warnings I get in the output tab with Logtalk Linter selected: ?- {loader}.
% [ /Users/jacquesrobin/logtalk/library/loops/loopp.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/loops/loop.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/loops/loader.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/meta/metap.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/meta/meta.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/meta/loader.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/termp.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/term.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/atomic.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/atom.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/callable.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/characterp.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/character.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/number.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/float.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/integer.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/natural.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/compound.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/pairs.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/listp.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/list.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/list1.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/difflist.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/numberlistp.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/numberlist.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/varlistp.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/varlist.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/comparingp.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/type.lgt loaded ]
% [ /Users/jacquesrobin/logtalk/library/types/loader.lgt loaded ]
* Reference to unknown object: gsContext(A,B)
* while compiling object gsSAS
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 61-77
*
* Reference to unknown object: transmitData
* while compiling object predictFlooding
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 114-121
*
* Reference to unknown object: organizeNetwork
* while compiling object predictFlooding
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 114-121
*
* Reference to unknown object: calculateFlowRate
* while compiling object predictFlooding
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 114-121
*
* Reference to unknown object: bluetooth
* while compiling object transmitData
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 134-139
*
* Reference to unknown object: wifi
* while compiling object transmitData
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 134-139
*
* Reference to unknown object: fhTopology
* while compiling object organizeNetwork
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 152-157
*
* Reference to unknown object: spTopology
* while compiling object organizeNetwork
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 152-157
*
* Reference to unknown object: singleNodeProcessing
* while compiling object calculateFlowRate
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 170-175
*
* Reference to unknown object: distributedProcessing
* while compiling object calculateFlowRate
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 170-175
*
* Reference to unknown object: bluetooth
* while compiling object energyEfficiency
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 192-198
*
* Reference to unknown object: wifi
* while compiling object energyEfficiency
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 192-198
*
* Reference to unknown object: singleNodeProcessing
* while compiling object energyEfficiency
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 192-198
*
* Reference to unknown object: bluetooth
* while compiling object faultTolerance
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 211-218
*
* Reference to unknown object: wifi
* while compiling object faultTolerance
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 211-218
*
* Reference to unknown object: fhTopology
* while compiling object faultTolerance
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 211-218
*
* Reference to unknown object: spTopology
* while compiling object faultTolerance
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 211-218
*
* Reference to unknown object: singleNodeProcessing
* while compiling object predictionAccuracy
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 229-234
*
* Reference to unknown object: distributedProcessing
* while compiling object predictionAccuracy
* in file /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt between lines 229-234
*
% [ /Users/jacquesrobin/VariaMos/gridstix/lgt/refasModel.lgt loaded ]
% [ /Users/jacquesrobin/VariaMos/gridstix/lgt/loader.lgt loaded ]
% 19 compilation warnings
true.
?- Is there a way to cut and paste code so that the pasted result includes the line numbers? Cheers! |
Please edit your above reply by writing Also, is there a public repo with the code? P.S. The warnings seem to be caused simply by the object definition order in the |
Done. See above. |
Thanks. Let's restrict this discussion here to the plug-in warnings parsing issue. For general questions on Logtalk, please use its forums (http://forums.logtalk.org/) or chat room (https://gitter.im/LogtalkDotOrg/logtalk3). |
Not yet, but I can invite you as team member of our the Azure Devops repo if you wish.
Indeed ! By reordering the object definitions bottom-up the dependency hierarchy instead of top-down, all the loading warnings are gone. But the VSC plug-in still underlines the first
Great tip, thanks! |
@JacquesRobin Sure. It will be interesting to learn more about your Logtalk application. |
I am getting a:
refasModel.lgt:32: Warning: Reference to unknown object: list
But on line 32 in that file I just have:
:- uses(list, [append/3]).
and in my loader file I have:
:- initialization(logtalk_load([ loops(loader), meta(loader), types(loader), refasModel ])).
Since Logtalk's list object is part of its types library, why is it unknown?
The only non-comments line I have before 32 in refasModel.lgt are:
:- object(metaclass, instantiates(metaclass)).
:- public(new/2).
new(Instance, Clauses) :-
self(Class),
create_object(Instance, [instantiates(Class)], [], Clauses).
:- end_object.
:- object(refasModel, instantiates(metaclass)).
The text was updated successfully, but these errors were encountered: