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

glossary duplicate term with a different case #7418

Closed
williamdes opened this issue Apr 5, 2020 · 17 comments
Closed

glossary duplicate term with a different case #7418

williamdes opened this issue Apr 5, 2020 · 17 comments

Comments

@williamdes
Copy link

Describe the bug

Warning, treated as error:
doc/glossary.rst:243:duplicate term description of mysql, other instance in glossary

To Reproduce
Steps to reproduce the behavior:
.travis.yml#L168

$ git clone --depth 1 https://github.com/phpmyadmin/phpmyadmin.git
$ cd doc
$ pip install 'Sphinx'
$ make html

Expected behavior
MySQL != mysql term right ?

Your project
https://github.com/phpmyadmin/phpmyadmin/blame/master/doc/glossary.rst#L234

Environment info

  • OS: Unix
  • Python version: 3.6
  • Sphinx version: 3.0.0

Additional context
Did occur some hours ago, maybe you just released the version

@tk0miya
Copy link
Member

tk0miya commented Apr 7, 2020

Sorry for the inconvenience. Indeed, this must be a bug. I'll take a look this later.

@tk0miya tk0miya added this to the 3.0.1 milestone Apr 7, 2020
tk0miya added a commit to tk0miya/sphinx that referenced this issue Apr 8, 2020
tk0miya added a commit to tk0miya/sphinx that referenced this issue Apr 8, 2020
tk0miya added a commit to tk0miya/sphinx that referenced this issue Apr 8, 2020
tk0miya added a commit that referenced this issue Apr 9, 2020
…dup_warning

Fix #7418: std domain: duplication warning for glossary terms is case insensitive
@tk0miya tk0miya closed this as completed Apr 9, 2020
@williamdes
Copy link
Author

Thank you for fixing it, let me know when a release it done so I can restart my builds

@tk0miya
Copy link
Member

tk0miya commented Apr 9, 2020

@williamdes Please follow #7453. I'll work for release maybe tomorrow.

@williamdes
Copy link
Author

Thank you 🚀
From the PR I could see linked, did you add a test case for what I sent ?

MySQL
   blablabla

mysql
   blablabla duplicate in lowercase

@tk0miya
Copy link
Member

tk0miya commented Apr 9, 2020

No. The reason of this problem is that sphinx makes the keywords downcase on storing to the internal database. So it's okay only to confirm the stored keyword is not downcased.

@williamdes
Copy link
Author

Okay, I understand

@ankostis
Copy link

So is this change on purpose?

I mean, do we have to change the casing of all terms on all our projects testing site with -W, or e.g. travis will fail?

@tk0miya
Copy link
Member

tk0miya commented Apr 17, 2020

No, the change was not intended. And it was fixed at 3.0.1.

@ankostis
Copy link

For a project of mine, it doesn't look fixed.

See these 2 travis-builds of 2 successive commits, then only difference being the casing of the terms has been equalized.

You maych check the pip-list to verify that sphinx-3.0.1 it is, indeed.

@williamdes
Copy link
Author

williamdes commented Apr 17, 2020

I only had to fix references to the glossary but not the glossary itself
phpmyadmin/phpmyadmin@41c1e36

@jtanx
Copy link

jtanx commented Apr 18, 2020

Seems a bit crap to introduce a breaking change on a point release. This breaks resolving terms in a case insensitive fashion.

jtanx added a commit to jtanx/fontforge that referenced this issue Apr 18, 2020
@tk0miya
Copy link
Member

tk0miya commented Apr 18, 2020

Okay, I understand what you're saying. It is also not an intended change. Now they become case-sensitive. But they should keep working. I'll work for it soon.

tk0miya added a commit to tk0miya/sphinx that referenced this issue Apr 18, 2020
tk0miya added a commit to tk0miya/sphinx that referenced this issue Apr 18, 2020
tk0miya added a commit that referenced this issue Apr 19, 2020
Fix #7418: std domain: term role role could not match case-insensitively
@tk0miya
Copy link
Member

tk0miya commented Apr 19, 2020

Now I merged #7501. It tries to search a term case-sensitively at first, and fallbacks to case-insensitive search automatically.
Thank you for reporting, all!

@stevepiercy
Copy link
Contributor

stevepiercy commented Apr 24, 2020

@tk0miya I think this is still not fixed in Sphinx 3.0.2 per our Travis build:

https://travis-ci.org/github/Pylons/pyramid/jobs/678922303#L770

To echo @ankostis, do we have to change the word casing of all terms or do we ignore these warnings?

If we are supposed to ignore these warnings, how can we ignore just this one type?

@tk0miya
Copy link
Member

tk0miya commented Apr 24, 2020

Ah, sorry for mention it. Please set supress_warnings = ['ref.term'] in your conf.py.

@stevepiercy
Copy link
Contributor

FTR, there was a typo, suppress_warnings = ['ref.term']. Alternatively, in tox.ini, "SPHINXOPTS=-W -E -D suppress_warnings=ref.term". It works now. Thank you!

@ankostis
Copy link

ankostis commented Jun 29, 2020

I tried suppress_warnings = ['ref.term'] and it suppress all term-reference errors.

In my projects i always setup a test-case detecting site-building warnings,
discovering thus any broken terms. The term-case warnings still trigger the TC to fail,
so i'm still forced to change the case (like when the term begins a new sentence).

  • Would it be possible to add a new suppress-warning for term-case mismattches?
  • Or to log term-case messages from WARNING-->INFO?
    (there isn't any real problem, after all)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants