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

Use C++20 modules #781

Closed
1 of 4 tasks
ken-matsui opened this issue May 22, 2023 · 1 comment
Closed
1 of 4 tasks

Use C++20 modules #781

ken-matsui opened this issue May 22, 2023 · 1 comment

Comments

@ken-matsui
Copy link
Member

ken-matsui commented May 22, 2023

TODO for this issue
Roadmap
  1. Use modules internally
  2. Support git dependencies
  3. Support building modules, i.e. build Poac itself
Build Steps

Currently cannot build tests.

export CXX=/opt/homebrew/opt/llvm/bin/clang++
cmake -B build -G Ninja -DPOAC_BUILD_TESTING=OFF
cd build
ninja
Current Status

On macOS, Poac can be built except for tests.

https://github.com/poac-dev/poac/actions/runs/5042517134

Known Issues
$ ./poac create hello 
poac(89900,0x1f1121e00) malloc: nano zone abandoned due to inability to reserve vm space.
[2023-05-21 23:21:47.791] [info]      Created binary (application) `hello` package
  1. Weird message from malloc => Use MallocNanoZone, like MallocNanoZone=0 ./poac create hello (cf. https://stackoverflow.com/questions/64126942/malloc-nano-zone-abandoned-due-to-inability-to-preallocate-reserved-vm-space)
  2. spdlog::set_pattern("%v") in src/main.cc isn't working

Opaque pointers are only supported in -opaque-pointers mode might be related.

Compilers
  • Clang 16 (Apple Clang doesn't work)
ken-matsui added a commit that referenced this issue May 22, 2023
#### What's changed

* renamed `src/etc` -> `etc`
* removed `lib` & `include`
* added `*.ixx` modules in `src`

#### Why?

I find the current structure to be unproductive. Adding a feature
requires me to include a header file, a library file, and edit the
CMakeLists.txt file while also considering header exposure. I believe
that utilizing C++20 modules will significantly expedite future
development.

---

The PR will be merged irrespective of the CI status. The CIs will be
addressed and #781 serves as the
tracking issue.
@ken-matsui
Copy link
Member Author

Stop using C++20 modules, will use a different way to structure the project when I have time next.

@ken-matsui ken-matsui closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2023
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

1 participant