Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

all.css file doesn't contain actual CSS #198

Closed
MaxDesiatov opened this issue Oct 4, 2020 · 4 comments
Closed

all.css file doesn't contain actual CSS #198

MaxDesiatov opened this issue Oct 4, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@MaxDesiatov
Copy link
Contributor

MaxDesiatov commented Oct 4, 2020

Steps to reproduce (steps for purely macOS builds not available due to #197):

  1. Run docker run --entrypoint /bin/bash -it swiftdoc/swift-doc
  2. In the container shell prompt run apt-get update && apt-get install git
  3. Run git clone https://github.com/swiftwasm/JavaScriptKit && cd JavaScriptKit
  4. Run swift-doc generate --base-url "/JavaScriptKit" --module-name JavaScriptKit --format html Sources
  5. Run cat .build/documentation/all.css

Expected result: valid CSS.

Actual result: Found output, can also be seen deployed to GitHub Pages.

@mattt
Copy link
Contributor

mattt commented Oct 4, 2020

Sorry for the inconvenience, @MaxDesiatov. Swift Package Manager resources caused a bunch of problems for the beta 5 release. I just reverted #192, and am in the process of cutting a new release. What a mess 😞

@MaxDesiatov
Copy link
Contributor Author

No worries. I wonder if we could add an end-to-end test checking that all.css has some valid CSS output?

@mattt
Copy link
Contributor

mattt commented Oct 4, 2020

@MaxDesiatov Absolutely. I think a lot more end-to-end testing would help avoid botched releases in the future.

@MaxDesiatov
Copy link
Contributor Author

This is fixed in master now, thank you!

MaxDesiatov added a commit that referenced this issue Oct 6, 2020
Verifies that generated `all.css` contains the `:root` string on CI. It doesn't do any actual CSS parsing to verify its full validity, only does a simple `grep` check, but I hope this will be enough to prevent issues like #198 in the future.

* Test that `all.css` contains a valid CSS selector

* Update `CHANGELOG.md`

* Install graphviz to avoid warnings on macOS

* Add EndToEndTests subclassing XCTest

* Apply suggestions from code review

Co-authored-by: Mattt <[email protected]>

* Remove stray comment leftover from review

* Set macOS 10.13 as minimum platform target

* Refactor EndToEndTests

Create helper methods on Process and Bundle

* Test whether generated HTML output contains subdirectories

* Add test for CommonMark output

* Add tests for coverage subcommand

* Add tests for diagram subcommand

* Update Changelog entry for #199

* Work around unavailability of hasDirectoryPath

* Update Changelog.md

Co-authored-by: Max Desiatov <[email protected]>

* Update Changelog entry for #199

Co-authored-by: Mattt <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants