backstage / mkdocs-techdocs-core

The core MkDocs plugin used by Backstage's TechDocs as a wrapper around multiple MkDocs plugins and Python Markdown extensions
Apache License 2.0
85 stars 61 forks source link

Strict Requirement pinnings #45

Closed dmaljovec closed 1 year ago

dmaljovec commented 2 years ago

Great work on this project!

I am wondering if the requirement pins in your dependency chain are all hard requirements? We are trying to use mkdocstrings in conjunction with this package for a Python 3.9 application and are getting a conflict on Markdown stemming from here: https://github.com/backstage/mkdocs-techdocs-core/blob/main/requirements.txt#L12. Is it true that you are not currently supporting latter versions of the Markdown package? Or was this possibly an overly conservative pinning?

dmaljovec commented 2 years ago

For example, we use pip-compile to generate lockfiles for all of our requirements, and we are getting breakage in the following use case:

docs.in (input file)

mkdocs
mkdocs-material
mkdocstrings
mkdocs-gen-files
mkdocs-literate-nav
mkdocs-section-index
mkdocs-techdocs-core
pytkdocs[numpy-style]

pip-compile --pip-args='--no-input' docs.in (command to generate a documentation lockfile)

...
There are incompatible versions in the resolved dependencies:
  Markdown<4.0,>=3.3 (from mkdocstrings==0.15.2->-r docs.in (...))
  Markdown==3.2.2 (from mkdocs-techdocs-core==0.2.1->-r docs.in (...))
  markdown>=3.2 (from mkdocs-material==7.3.6->-r docs.in (...))
  Markdown>=3.2.1 (from mkdocs==1.2.3->-r docs.in (...))
dmaljovec commented 2 years ago

FWIW, if I pip install mkdocs-tech-docs first and then install the rest of these requirements, pip complains that my Markdown is incompatible, but I am able to run techdocs-cli generate --no-docker or mkdocs build without error. Perhaps, I am not exercising the incompatible features?

iamEAP commented 2 years ago

Hey there! Yeah, looks like the strict pinning is coming from a problem with planuml (check out https://github.com/backstage/mkdocs-techdocs-core/pull/37 for details).

Happy to loosen that restriction if we can prevent the issue described.

iamEAP commented 1 year ago

Closing this out now, as our dependency on markdown has been loosened!