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

Long options warnings messages #8657

Closed
Esteban82 opened this issue Jan 2, 2025 · 3 comments
Closed

Long options warnings messages #8657

Esteban82 opened this issue Jan 2, 2025 · 3 comments
Labels
feature request Request a new feature

Comments

@Esteban82
Copy link
Member

I run this command with long options and I got a warning messagge:

gmt basemap --projection=X8/5 -Bx100+l"Depth (km)" -By2+l"Magnitude" --region=0/300/0/10 -png XY

and I got this warning message:

gmt [WARNING]: Reformatted options: -JX8/5 -B"x100+lDepth (km)" -By2+lMagnitude -R0/300/0/10 -png XY

I think that it would be better to set those messages to information (instead of warning).

@Esteban82 Esteban82 added the feature request Request a new feature label Jan 2, 2025
@Esteban82
Copy link
Member Author

It would be good to do it before the release of GMT6.6 (#8653)

What do you think?

joa-quim added a commit that referenced this issue Jan 2, 2025
But keep in mind that there are warnings in the code above this.
@joa-quim
Copy link
Member

joa-quim commented Jan 2, 2025

Yes, we definitively don't want that message printed. But things may be not that easy. A commented section before that printing line says:

#if 0
	if (modified && gmt_M_is_verbose (API->GMT, GMT_MSG_INFORMATION)) {	/* Echo the converted options */
		char *cmd = GMT_Create_Cmd (API, *options);
		GMT_Report (API, GMT_MSG_INFORMATION, "Reformatted options: %s\n", cmd);
	/* we actually cannot yet tell if gmt_M_is_verbose(... GMT_MSG_INFORMATION ...)
	   will come to pass without working a bit harder as args are not yet fully parsed,
	   and also note that at this point we will always be at GMT_MSG_WARNING or whatever
	   default verbosity level the program is initialized with -- fix this later (or not)! */
#endif

Anyway, I made #8658 to let us test this more.

joa-quim added a commit that referenced this issue Jan 3, 2025
But keep in mind that there are warnings in the code above this.
@joa-quim
Copy link
Member

joa-quim commented Jan 3, 2025

Adressed in #8658

@joa-quim joa-quim closed this as completed Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a new feature
Projects
None yet
Development

No branches or pull requests

2 participants