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

Re-Enable Haddock Docs on CD #1578

Closed
Mornix opened this issue Jun 18, 2019 · 8 comments
Closed

Re-Enable Haddock Docs on CD #1578

Mornix opened this issue Jun 18, 2019 · 8 comments

Comments

@Mornix
Copy link
Collaborator

Mornix commented Jun 18, 2019

Stack 2.1.1 is a large update to Stack that changes a lot of the internals. One of the (unfortunate) side-effects of the changes is Haddock (through Stack integration) uses absolute links as opposed to relative links (which Stack <2 uses).

Upon further inspection (make docs haddockArgs="-v") it appears the command run immediately after the text line "Updating Haddock index for local packages in ", updates the index. The arguments passed into Haddock for this command include many -i (short for --read-interface) which determines which packages are available to index. Stack <2 provides relative links in this command while Stack 2.1.1 provides absolute links.

Some possible courses of action to re-enable docs:

  1. sed over the links in the generated index and strip absolute paths.
  2. Manually run the command mentioned above with relative paths to generate a correct index.
@JacquesCarette
Copy link
Owner

As far as I can tell, this was fixed in late September 2019 in stack, which seems to mean it was fixed in stack 2.3.1.

@Mornix
Copy link
Collaborator Author

Mornix commented May 27, 2020

That looks like it should fix it! A local build on 2.3.1 looks like it does the trick. I notice you pushed code already to address it. If you run a build of master again (manually) that should trigger a deploy (now) and allow us to check.

@JacquesCarette
Copy link
Owner

Haddocks were successfully built in 3311342. Since I've also checked in something else, that build ought to trigger a deploy, if the previous one didn't already (it looked like it did).

@Mornix
Copy link
Collaborator Author

Mornix commented May 27, 2020

Haddocks have always successfully built. It was when they were deployed links would 404 because they were absolute and led to a path that didn't exist.

Deploys are only triggered on a cron once daily, but I believe I added an "override" so a manually trigger build of master would do it too?

Edit: Link to script for clarity.

if [[ "$TRAVIS_EVENT_TYPE" != "cron" && "$TRAVIS_EVENT_TYPE" != "api" ]]; then
echo "Deployment only occurs for cron (or api -- manually run) builds."

@JacquesCarette
Copy link
Owner

How do I run an "api" build?

@Mornix
Copy link
Collaborator Author

Mornix commented May 27, 2020

Try https://blog.travis-ci.com/2017-08-24-trigger-custom-build, going to the Travis build for that commit, and on the dropdown there should be "Trigger Build" or something along those lines.

@Mornix
Copy link
Collaborator Author

Mornix commented May 27, 2020

Fix verified with 43aedea to gh-pages. Closing.

@Mornix Mornix closed this as completed May 27, 2020
@smiths
Copy link
Collaborator

smiths commented May 27, 2020

Nice to see an almost year old issue closed. 😄

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

No branches or pull requests

3 participants