Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

make book fails when any of its component targets (tests, docs, or marimushka) are unavailable or fail, blocking documentation generation. Reported in projects without test infrastructure or with failing test suites, docs generation issues, or missing notebooks.

Changes

  • Remove hard dependencies: book target no longer depends on test, docs, or marimushka targets
  • Add conditional execution: All three targets run opportunistically via $(MAKE) <target> || printf warning
  • Preserve existing behavior: Component outputs (API docs, coverage, reports, notebooks) still included when available; missing sections already skip gracefully
-book:: test docs marimushka
+book:: install-uv
 	@printf "${BLUE}[INFO] Building combined documentation...${RESET}\n"
+	
+	# Run docs but don't fail book if docs fail or are unavailable
+	@$(MAKE) docs || printf "${YELLOW}[WARN] Docs failed or unavailable, continuing with book generation${RESET}\n"
+	
+	# Run marimushka but don't fail book if marimushka fails or is unavailable
+	@$(MAKE) marimushka || printf "${YELLOW}[WARN] Marimushka failed or unavailable, continuing with book generation${RESET}\n"
+	
+	# Run tests but don't fail book if tests fail or are unavailable
+	@$(MAKE) test || printf "${YELLOW}[WARN] Tests failed or unavailable, continuing with book generation${RESET}\n"
+	
 	@rm -rf _book && mkdir -p _book

Book generation now succeeds in all scenarios: all components passing, any combination failing, or any/all components absent.

Original prompt

This section details on the original issue you should resolve

<issue_title>Book fails if test is not there</issue_title>
<issue_description>For an example see https://github.com/tschm/babynames/actions/runs/21408437517/job/61638668359
Make book shall survive the lack of 'make test'</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 27, 2026 18:08
- Remove test as a hard dependency from book target
- Add conditional test execution within book target
- Tests will run if available but won't block book generation
- Fixes issue where book fails if tests don't exist or fail

Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
- Remove duplicate test folder check
- Rely on test target's built-in handling of missing tests
- Cleaner and more maintainable code
- Addresses code review feedback

Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
@tschm tschm marked this pull request as ready for review January 27, 2026 18:11
Copilot AI changed the title [WIP] Fix book functionality to survive lack of make test Make book target resilient to test failures Jan 27, 2026
Copilot AI requested a review from tschm January 27, 2026 18:13
@tschm
Copy link
Member

tschm commented Jan 27, 2026

@copilot Do the same trick for docs and marimushka

- Remove docs and marimushka as hard dependencies from book target
- Add conditional execution for docs and marimushka with error handling
- Book will continue if docs or marimushka fail or are unavailable
- Addresses feedback to apply same trick for docs and marimushka

Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 27, 2026

@copilot Do the same trick for docs and marimushka

Applied the same resilience pattern to docs and marimushka targets. The book target now conditionally executes all three targets (docs, marimushka, test) and continues with book generation even if any of them fail. See commit 6a970dd.

- Use consistent phrasing across all three targets
- All warnings now say "failed or unavailable"
- Improves code consistency and readability

Co-authored-by: tschm <2046079+tschm@users.noreply.github.com>
Copilot AI changed the title Make book target resilient to test failures Make book target resilient to all component failures Jan 27, 2026
@tschm tschm requested a review from HarryCampion January 27, 2026 19:50
@HarryCampion
Copy link
Collaborator

I worry about silent failures here like we saw in loman

@tschm
Copy link
Member

tschm commented Jan 28, 2026

I think for the book this makes sense. it creates all those content-cards only if the related job was successful. So, people may have no tests but the book is still working. If you then expect pages in the book that are missing you can see in the warnings for 'make book' that 'make test' did not work. The alternative is that we keep having an empty standard 'make test' somewhere not in the tests folder?

@tschm tschm closed this Jan 28, 2026
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

Successfully merging this pull request may close these issues.

Book fails if test is not there

3 participants