Include DocumentationPath in module push#2027
Conversation
saquibmian
left a comment
There was a problem hiding this comment.
The only part of this that's funky is when we do ModuleToBucket we don't know the original filename, so we would be writing it with buf.md when it could have been README.md. @bufdev can you see a scenario where that matters?
|
Yea this doesn't handle the roundtrip scenario, that will matter for ie buf export. I think it's a little more complicated than this, can talk about it |
|
Wait, might not matter for buf export, but yea I think I thought about this before and it was more complicated - @doriable might have insight as well (might involve docs) |
|
We could go about this in a few different ways:
All three of these scenarios have the BSR storing the filename, we could default to Are there alternative approaches? |
|
|
Yes this is correct -- |
|
You likely need to store the file path in the |
|
This may affect the digest as well |
|
I guess I'm questioning a little bit the user experience problem we are solving here. In our original discussions, we were concerned with just picking up |
|
Agreed with @doriable, I think at the least we could warn to the user that we're falling back to their README.md and this may not be desired. |
This will but that's OK. A new release will include this file when sending to/receiving from the BSR. Older clients will ignore it. It does mean using an old and new client together will cause a ping-pong of commits, but that's expected behavior given each one is sending different content to the BSR. |
|
Putting this on hold until we find out how to proceed due to the concerns of its side effects and the user experience problem. |
|
Had an offline discussion with @bufdev. We came to the conclusion that private information in a With that being said, a couple of notes for this change:
|
Something to keep in mind: the more paths that we can consume for the "same" documentation, the more we have to support when trying to parse documentation. Case in point, the consideration of what to do when a user has |
Include
DocumentationPathin the module onbuf push.Support fallback paths,
README.mdandREADME.markdown, for module documentation.If
buf.mdfile is not available, the fallback pathsREADME.md, orREADME.markdownare checked in the order.