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

[search] [ssr] Emit deprecated message when calling search from ssreflect #12341

Merged
merged 1 commit into from
May 18, 2020

Conversation

ejgallego
Copy link
Member

but ssrsearch is not loaded.

Fixes #12338

Actually I think it is a good idea to let this reach master for a while, for those using master + ssreflect.

@ejgallego ejgallego requested review from a team as code owners May 17, 2020 11:48
@ejgallego ejgallego added this to the 8.12+beta1 milestone May 17, 2020
@ejgallego ejgallego added kind: user messages Improvement of error messages, new warnings, etc. part: ssreflect The SSReflect proof language. labels May 17, 2020
@ejgallego ejgallego requested a review from Zimmi48 May 17, 2020 11:48
Copy link
Member

@Zimmi48 Zimmi48 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, sounds good!

Comment on lines 310 to 314
"ssreflect Search command has been moved to the \
ssrsearch module; please Require that module if you \
still want to use ssreflect's Search command"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use official casing:

Suggested change
"ssreflect Search command has been moved to the \
ssrsearch module; please Require that module if you \
still want to use ssreflect's Search command"))
"SSReflect's Search command has been moved to the \
ssrsearch module; please Require that module if you \
still want to use SSReflect's Search command"))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the message should invite the user to try out the "vanilla" search and only require ssrsearch after filing an issue (of a missing feature for example).

The message assumes the user knows why the command was moved, which may not be the case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the main reason for moving the command is because it overwrites the default one (see also #12253). The deprecation message emitted by Search in ssrsearch encourages the use of the default Search with the headconcl: clause instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see, the warning is implemented in ssr/ssrvernac.mlg but is only issues by ssrsearch/g_ssrsearch.mlg, am I right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two warnings:

  • the one in ssrvernac is only emitted if the ssrsearch plugin is not loaded, and it tells the user that this is not anymore the SSReflect's Search
  • the one in ssrsearch is emitted when using SSReflect's Search and recommends using the headconcl: clause of the normal Search.

Does that make sense? Would you do it differently?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to try it out, I guess. I will before the final

plugins/ssrsearch/g_search.mlg Outdated Show resolved Hide resolved
@Zimmi48
Copy link
Member

Zimmi48 commented May 17, 2020

The two refman failures are two unrelated timeouts. I think we were unlucky and got a sudden runner slowdown. This likely should go away at the next CI run.


let warn_search_moved_enabled = ref true
let warn_search_moved = CWarnings.create ~name:"ssr-search-moved"
~category:"deprecation" ~default:CWarnings.Enabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for noticing that late, but this category does not exist. The following one does:

Suggested change
~category:"deprecation" ~default:CWarnings.Enabled
~category:"deprecated" ~default:CWarnings.Enabled

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an area where we would IMHO gain from having a datatype + constructors.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an area where we would IMHO gain from having a datatype + constructors.

Yes, I noticed this and I'm currently preparing a PR doing exactly this.

@Zimmi48 Zimmi48 merged commit b7c14a8 into coq:master May 18, 2020
@ejgallego ejgallego deleted the ssr+search_warn branch May 18, 2020 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: user messages Improvement of error messages, new warnings, etc. part: ssreflect The SSReflect proof language.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[search] Add removal warning for ssr's Search
3 participants