Skip to content
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

[GS] Add information to compilation errors sent back from gama-server #172

Closed
lesquoyb opened this issue May 16, 2024 · 0 comments · Fixed by #226
Closed

[GS] Add information to compilation errors sent back from gama-server #172

lesquoyb opened this issue May 16, 2024 · 0 comments · Fixed by #226
Labels
About GAMA Server This issue concerns GAMA server usage 🤗 Enhancement This is a request for enhancement

Comments

@lesquoyb
Copy link
Contributor

Is your request related to a problem? Please describe.
When trying to run through gama-server models on which you are currently working, it often happens that there are compilation errors. In that case gama-server returns the list of errors to the client so they know why the model cannot run.
The problem is that those errors are just the line of text of the actual error objects, lacking the whole context, like in which file and line they appear as well as their "level" of error: real compilation errors are mixed with warnings and info but we don't know which is which.
For example here is what I get for trying to compile a small model:

Compilation errors: 
This definition of shape supersedes the one in built-in species agent
This definition of shape supersedes the one in built-in species agent
machine_time is not defined or accessible in this context. Check its name or declare it
machine_time is not defined or accessible in this context. Check its name or declare it
machine_time is not defined or accessible in this context. Check its name or declare it
No operator found for applying '+' to types [float, unknown] (operators available for [types [map, pair], types [float, int], types [matrix, matrix], types [rgb, rgb], types [container, container], types [map, map], types [float, float], types [string, string], types [field, int], types [field, float], types [float, matrix], types [field, matrix], types [date, int], types [date, float], types [date, string], types [geometry, float], types [point, int], types [point, float], types [int, int], types [point, point], types [geometry, geometry], types [geometry, float, int, int, bool], types [int, float], types [geometry, float, int, int], types [int, matrix], types [geometry, float, int], types [geometry, float, bool], types [container, unknown], types [matrix, int], types [matrix, float], types [rgb, int], types [string, unknown]])
machine_time is not defined or accessible in this context. Check its name or declare it
machine_time is not defined or accessible in this context. Check its name or declare it
machine_time is not defined or accessible in this context. Check its name or declare it
No operator found for applying '+' to types [float, unknown] (operators available for [types [map, pair], types [float, int], types [matrix, matrix], types [rgb, rgb], types [container, container], types [map, map], types [float, float], types [string, string], types [field, int], types [field, float], types [float, matrix], types [field, matrix], types [date, int], types [date, float], types [date, string], types [geometry, float], types [point, int], types [point, float], types [int, int], types [point, point], types [geometry, geometry], types [geometry, float, int, int, bool], types [int, float], types [geometry, float, int, int], types [int, matrix], types [geometry, float, int], types [geometry, float, bool], types [container, unknown], types [matrix, int], types [matrix, float], types [rgb, int], types [string, unknown]])
machine_time is not defined or accessible in this context. Check its name or declare it
machine_time is not defined or accessible in this context. Check its name or declare it
machine_time is not defined or accessible in this context. Check its name or declare it
No operator found for applying '+' to types [float, unknown] (operators available for [types [map, pair], types [float, int], types [matrix, matrix], types [rgb, rgb], types [container, container], types [map, map], types [float, float], types [string, string], types [field, int], types [field, float], types [float, matrix], types [field, matrix], types [date, int], types [date, float], types [date, string], types [geometry, float], types [point, int], types [point, float], types [int, int], types [point, point], types [geometry, geometry], types [geometry, float, int, int, bool], types [int, float], types [geometry, float, int, int], types [int, matrix], types [geometry, float, int], types [geometry, float, bool], types [container, unknown], types [matrix, int], types [matrix, float], types [rgb, int], types [string, unknown]])
machine_time is not defined or accessible in this context. Check its name or declare it
No operator found for applying '+' to types [string, unknown] (operators available for [types [map, pair], types [float, int], types [matrix, matrix], types [rgb, rgb], types [container, container], types [map, map], types [float, float], types [string, string], types [field, int], types [field, float], types [float, matrix], types [field, matrix], types [date, int], types [date, float], types [date, string], types [geometry, float], types [point, int], types [point, float], types [int, int], types [point, point], types [geometry, geometry], types [geometry, float, int, int, bool], types [int, float], types [geometry, float, int, int], types [int, matrix], types [geometry, float, int], types [geometry, float, bool], types [container, unknown], types [matrix, int], types [matrix, float], types [rgb, int], types [string, unknown]])
No file specified
No stopping condition have been defined (facet 'until:'). This may result in an endless run of the batch experiment

And so it's not very convenient to quickly fix the problems, and it's impossible to handle it programmatically (the client could print the info in a certain way, the errors in another for example)

Describe the improvement you'd like
A more detailed output of the compilation problems, maybe return an object instead of a message in that case ?

@lesquoyb lesquoyb added 🤗 Enhancement This is a request for enhancement About GAMA Server This issue concerns GAMA server usage labels May 16, 2024
@lesquoyb lesquoyb moved this from Todo to To Test in GAMA 2024-11 Jun 25, 2024
@lesquoyb lesquoyb removed this from GAMA 2024-11 Jun 28, 2024
@lesquoyb lesquoyb moved this from Todo to Done in GAMA 2024-11 Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
About GAMA Server This issue concerns GAMA server usage 🤗 Enhancement This is a request for enhancement
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant