bitter-ability-32190
10/31/2023, 7:14 PMcurved-television-6568
10/31/2023, 7:29 PMbitter-ability-32190
10/31/2023, 7:30 PMpants help-all. That not only requires compiling the engine (🤮 ) but that command itself takes several seconds to run (even if someone how the engine was cached).
THEN you actually generate the content 😕curved-television-6568
10/31/2023, 7:33 PMcurved-television-6568
10/31/2023, 7:33 PMbitter-ability-32190
10/31/2023, 7:34 PMcurved-television-6568
10/31/2023, 7:36 PMcurved-television-6568
10/31/2023, 7:37 PMpants help-all | cmd-to-generate-ref-docs while in a workflow it’s download cached help-all | cmd-to-generate-ref-docsbroad-processor-92400
10/31/2023, 7:41 PMbitter-ability-32190
10/31/2023, 7:46 PMmain (or more precisely whatever branch you're on)
The overall user experience of having the tool itself (docusaurus, but same goes for mkdocs-material) manage versions is superior to host-provided versioning. Save for the technical impact, where each version needs to exist pre-buildbitter-ability-32190
10/31/2023, 7:48 PMdownload cached help-all ... that seems very,,,, rest-of-the-fucking-owl 🪄bitter-ability-32190
10/31/2023, 7:54 PMerror?curved-television-6568
10/31/2023, 7:54 PMcurved-television-6568
10/31/2023, 7:55 PMbitter-ability-32190
10/31/2023, 7:55 PMbitter-ability-32190
10/31/2023, 7:56 PMcurved-television-6568
10/31/2023, 7:57 PMcurved-television-6568
10/31/2023, 7:57 PMcurved-television-6568
10/31/2023, 7:58 PMbroad-processor-92400
10/31/2023, 10:12 PM<s3://docs.pantsbuild.org/2.34.5.dev6/>... for the 2.34.5.dev6 release)
3. Separate processing (either maintained by us, or from the hosting provider) injects the cross-version functionality, like version selector and redirects for latestbitter-ability-32190
11/01/2023, 12:20 AMbitter-ability-32190
11/01/2023, 12:21 AMbroad-processor-92400
11/01/2023, 12:26 AMbroad-processor-92400
11/01/2023, 12:30 AMbitter-ability-32190
11/01/2023, 12:33 AMbroad-processor-92400
11/01/2023, 12:35 AMbroad-processor-92400
11/01/2023, 12:40 AMbroad-processor-92400
11/01/2023, 12:51 AMbitter-ability-32190
11/01/2023, 1:10 AMnpm buildbitter-ability-32190
11/01/2023, 1:13 AMHaving our lowest effort MVP involve committing generated files across dozens of (outdated) branchesWe're already going to have to commit files to those branches, if we want those branches to have docs.
The ability to fix website-creation problems without having to do a Pants release...I'm not sure where the idea was given that we'd need to do a release for docs publishing, but we'd be able to publish the docs ~whenever. Every push even...
broad-processor-92400
11/01/2023, 1:16 AMWe're already going to have to commit files to those branches, if we want those branches to have docs.I'm not sure I follow. If we treat the docs as a built artefact stored outside the repo, we can backfill those artefacts however we want (similar to how we didn't have to commit anything to 2.0.x (etc) have github releases all the way back to 2.0.0)
bitter-ability-32190
11/01/2023, 1:17 AMbitter-ability-32190
11/01/2023, 1:18 AMIf we treat the docs as a built artefact stored outside the repo,The built docs, yes. But the source of the docs, no. I'm not quite following the parallel with releases.
broad-processor-92400
11/01/2023, 1:18 AMIf we treat the docs as a built artefact stored outside the repo,(Or, at least, the files that are inputs to the doc building process, whether rendered HTML or md)
broad-processor-92400
11/01/2023, 1:25 AM<s3://docs-artefacts/2.34.5.zip>
2. the pantsasaurus build downloads all the zipfiles it wants and unpacks them into the appropriate places such as docs/
So, the codegen help-all extraction happens in 1, as part of the release process. It produces md files not HTML. Then the docs build process can mash up those MD files as it needs to, without needing to rerun the codegen for all the versions.
Then, for the old versions, we create the zipfiles via some out-of-CI method and put them in the S3 bucket (e.g. <s3://docs-artefacts/2.0.0.zip>, <s3://docs-artefacts/2.1.0.zip>, ...), rather than committing them.bitter-ability-32190
11/01/2023, 1:33 AMbroad-processor-92400
11/01/2023, 1:35 AMcurved-television-6568
11/01/2023, 1:48 AMpants help-all for each branch we want to document?
Then yea, it feels really wasteful to re-run that on every doc publish for all the historic versions knowing that they will be the ~same every time. Checking this in feels like a good move, but perhaps have a dedicated repo for the generated docs that is a wash that is more temporary and doesn't bloat the main pants repo?curved-television-6568
11/01/2023, 1:51 AMbitter-ability-32190
11/01/2023, 1:56 AMbitter-ability-32190
11/01/2023, 2:00 AMcurved-television-6568
11/01/2023, 2:00 AMbitter-ability-32190
11/01/2023, 2:00 AMnpm start -> localhost:3000curved-television-6568
11/01/2023, 2:01 AMnpm start is run off of the docs-repo where we have all the reference docs material generated into.. ? then it would contain everything, right?curved-television-6568
11/01/2023, 2:02 AMcurved-television-6568
11/01/2023, 2:03 AMdocs-repo too... I think..curved-television-6568
11/01/2023, 2:03 AMbitter-ability-32190
11/01/2023, 2:04 AMcurved-television-6568
11/01/2023, 2:04 AMcurved-television-6568
11/01/2023, 2:05 AMcurved-television-6568
11/01/2023, 2:06 AM"store the generated markdown somewhere"
curved-television-6568
11/01/2023, 2:06 AMbroad-processor-92400
11/01/2023, 2:08 AM❌ Running docs locally means you dont see reference docsI don't understand this. If we have a process for "create and store the geneated markdown somewhere", can't the process to create that markdown feed into running the docs locally?
❌ dead linksWhy does this follow?
❌ reference docs lag behind in-repo docsThis seems correct? It seems undesirable to have the published reference docs ahead of actual releases. Sometimes it'll just be some text changes that could go out early, but often it'll be more than that (new fields etc.)
bitter-ability-32190
11/01/2023, 2:11 AMnpm start to see the reference docs
2. Any docs links to reference docs will be dead
3. I was thinking more about changes locally. E.g. I want to make a PR to the docs/ and need to link to the field. But essentially it's just another flavor of "dead link"broad-processor-92400
11/01/2023, 2:14 AMnpm start to see the reference docs
Ah, I was assuming anything in the Pants repo would be run via pants itself and thus be able to depend on codegen targets. (I think technically we could also have npm start have a prestart script that calls pants too)
> Any docs links to reference docs will be dead
As in, for the files stored in the repo, [text](reference-blah) will look broken for source-code-only analysis? If we have a tool that can check dead links for us (is that what you're thinking?), could it hook into the codegen target above too to have all files available?
> I was thinking more about changes locally. E.g. I want to make a PR to the docs/ and need to link to the field. But essentially it's just another flavor of "dead link"
Hm, not sure what you mean, but okay, I'll assume solving dead links solves this.happy-kitchen-89482
11/01/2023, 4:12 AMhappy-kitchen-89482
11/01/2023, 4:12 AMhappy-kitchen-89482
11/01/2023, 4:12 AMhappy-kitchen-89482
11/01/2023, 4:13 AMhappy-kitchen-89482
11/01/2023, 4:13 AMhappy-kitchen-89482
11/01/2023, 4:13 AMbitter-ability-32190
11/01/2023, 11:41 AMbitter-ability-32190
11/01/2023, 11:43 AMbitter-ability-32190
11/01/2023, 11:44 AMbitter-ability-32190
11/01/2023, 11:45 AMbitter-ability-32190
11/01/2023, 1:54 PMcurved-television-6568
11/01/2023, 2:10 PMcurved-manchester-66006
11/01/2023, 2:34 PMbitter-ability-32190
11/01/2023, 4:12 PMmkdocs and docusaurus.
The hard part for us is two-fold:
• We have generated docs --> reference docs which are generated (we can choose to generate either html or markdown) from pants help-all
• We want to maintain docs for over a dozen versions. Albeit some are "dead".
Those are where the challenge lies.
Docs hosters (like readthedocs, and readme) offer "let us handle the versioning for you". That's a huge pro for the multiple-versions thorn. But is also is a con, because "evergreen" docs are now versioned, and you usually are getting a shittier UI/UX when it comes to versioning.
We could use the tools' versioning scheme which means everything stays in ecosystem, but that means we need all of the docs (going back to every version) at build time. The big pro is you get one complete docs site (meaning you could go as simple as GitHub Pages).
If there was a way in-tool to do a partial build (mkdocs maaaayyyybe has one, but I'm leaning heavily on docusaurus) this would be mostly a nonstarter. Maybe I'll ask aroundbitter-ability-32190
11/01/2023, 4:46 PMrmdir the old and cp the new.
Unfortunately with each build, it builds a different named main-(some id).js component which is referenced in each page (I think this would be called the "server"). So if you tried to merge just that docs' build, it'd have references to a different "runtime". 😞curved-manchester-66006
11/01/2023, 6:21 PMbitter-ability-32190
11/01/2023, 6:50 PMbroad-processor-92400
11/01/2023, 9:28 PMMaybe I'll do a write up soon and make (another) GitHub DiscussionYeah, this'd be helpful; as it is, I think we're trying to evaluate/provide feedback on a small piece of a larger plan, without seeing the larger plan 🙂
bitter-ability-32190
11/02/2023, 1:58 AMhelp-all because we're asking for help on plugins baked into Pants itself. That changes things I think...
This whole thing might be moot, as that doesn't feel prohibitively expensive...bitter-ability-32190
11/02/2023, 1:58 AMbitter-ability-32190
11/02/2023, 2:38 PMWe'll likely want/need a strategy to not run this process on "dead" branches. Both for the savings in build time as well as complexity (theoutput likely has and will change, meaning we would need to maintain multiple "generator" templates).help-all
curved-television-6568
11/02/2023, 3:23 PMI’m realizing now that we dont have to compile the engine to runI don’t think all iterations of backends is compatible with any one version of the engine… 😕because we’re asking forhelp-allon plugins baked into Pants itself. That changes things I think...help
bitter-ability-32190
11/02/2023, 3:25 PMcurved-television-6568
11/02/2023, 3:28 PMbitter-ability-32190
11/07/2023, 5:42 PMhelp-all in a loop over all the versions, lol