Skip to content

Commit

Permalink
Fixing conflicting docs on docs about how to generate the docs.
Browse files Browse the repository at this point in the history
I discovered we had two sets of conflicting docs about how to generate the docs. This is likely part of what has led to the documentation mess I'm cleaning up. Fixing...
  • Loading branch information
sean-parent committed Jun 29, 2024
1 parent 079f92e commit 41507cf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 22 deletions.
21 changes: 4 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ASL libraries will be migrated here in the `stlab` namespace, new libraries will

### [Concurrency](https://www.stlab.cc/libraries/concurrency/)

This library provides futures and channels, high level abstractions for implementing algorithms that eases the use of multiple CPU cores while minimizing contention. This library solves several problems of the C++11 and C++17 TS futures.
This library provides futures and channels, high-level abstractions for implementing algorithms that ease the use of multiple CPU cores while minimizing contention. This library solves several problems of the C++11 and C++17 TS futures.

## Documentation

Expand Down Expand Up @@ -58,7 +58,7 @@ cmake -S . -B ../BUILD -DCMAKE_BUILD_TYPE=# SEE BELOW

but there are other options you may need to append in order to be successful. Among them:

- `-DCMAKE_BUILD_TYPE=`[`Release`|`Debug`] to build the given configuration (required unless you're using visual studio or another multi-config generator).
- `-DCMAKE_BUILD_TYPE=`[`Release`|`Debug`] to build the given configuration (required unless you're using Visual Studio or another multi-config generator).
- `-DCMAKE_CXX_STANDARD=`[`17`|`20`|`23`] to build with compliance to the given C++ standard.
- `-DBUILD_TESTING=OFF` if you only intend to build, but not test, this library.
- `-DBoost_USE_STATIC_LIBS=TRUE` if you will be testing on Windows.
Expand Down Expand Up @@ -101,21 +101,8 @@ or
ctest -C Release
```

depending on which configuration (`CMAKE_BUILD_TYPE`) you chose to build.
depending on which configuration (`CMAKE_BUILD_TYPE) you choose to build.

## Generating Documentation

STLab uses [hyde](https://github.com/adobe/hyde) to generate documentation boilerplate by scanning its public headers. You will need to follow Hyde's installation instructions and have `hyde` on your `$PATH` (detectable by `which hyde`).

When adding a new public API, you should invoke

```
docker run --platform linux/x86_64 --mount type=bind,source="$(pwd)/..",target=/mnt/host --tty --interactive hyde bash
```

```
cd /mnt/host/libraries
./validate_docs.sh --update
```

(or, simply `-u`) to generate the boilerplate for it. Then, fill in any fields marked as `__MISSING__`. Fields marked as `__OPTIONAL__` may be omitted.
For generating the documentation, see the [README.md](docs/README.md) in the `docs` directory.
4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,7 @@ cd /mnt/host/libraries/docs
./generate_docs.sh
./about.sh
```

\[ this is from the old docs - need to update the docs and script.
> (or, simply `-u`) to generate the boilerplate for it. Then, fill in any fields marked as `__MISSING__`. Fields marked as `__OPTIONAL__` may be omitted.
\]
5 changes: 1 addition & 4 deletions docs/includes/stlab/concurrency/await.hpp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ layout: library
title: stlab/concurrency/await.hpp
hyde:
owner: sean-parent
brief: |
Await provides utilities to synchronously await the value from a `future` and to notify the default executor that a task is waiting. Blocking calls are discouraged because they may lead to deadlocks or thread explosions.
There is a good presentation of the issues [here](https://youtu.be/Z86b3Rd09sE).
brief: "Await provides utilities to synchronously await the value from a `future` and to notify the default executor that a task is waiting. Blocking calls are discouraged because they may lead to deadlocks or thread explosions.\n\nThere is a good presentation of the issues [here](https://youtu.be/Z86b3Rd09sE).\n"
tags:
- sourcefile
library-type: sourcefile
Expand Down
6 changes: 5 additions & 1 deletion validate_docs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

echo "This script is deprecated. Please use the new generate_docs.sh script instead."
echo "Keep this script temporarily until we move all the options into generate_docs."
exit 1

#
# This script invokes Hyde on the headers in the stlab directory.
# Also see .hyde-config.
Expand Down Expand Up @@ -118,7 +122,7 @@ then
echo "$CMAKE_BUILD_DIR already exists. Please delete it or use -f."
exit 1
else
cmake -S. -B $CMAKE_BUILD_DIR $CMAKE_ARGS
cmake --preset="hyde-build-docs"
fi

#
Expand Down

0 comments on commit 41507cf

Please sign in to comment.