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

Full reimplementation #799

Merged
merged 166 commits into from
Dec 22, 2023
Merged
Changes from 1 commit
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
fc237b5
(WIP): Stop using C++20 modules
ken-matsui Dec 15, 2023
7f87fbd
Builder base
ken-matsui Dec 15, 2023
398ad47
Add a new header
ken-matsui Dec 15, 2023
f885f5a
Self build
ken-matsui Dec 15, 2023
159359e
Better topo sort
ken-matsui Dec 15, 2023
f406247
Refactoring
ken-matsui Dec 15, 2023
58e9b40
Support additional sources
ken-matsui Dec 15, 2023
80cc2a2
Better constness
ken-matsui Dec 15, 2023
51f9ade
Handle backslash
ken-matsui Dec 15, 2023
c439eba
Refactoring
ken-matsui Dec 15, 2023
32bc8f1
PHONY
ken-matsui Dec 15, 2023
dfea1f1
Split
ken-matsui Dec 15, 2023
5c77c86
CLI interface
ken-matsui Dec 15, 2023
bb4468e
Refactoring
ken-matsui Dec 15, 2023
1715ceb
Add logger and restructure
ken-matsui Dec 16, 2023
2ba1cc0
Use logger
ken-matsui Dec 16, 2023
3e351b6
Use logger more
ken-matsui Dec 16, 2023
43d2dd6
tests -> testsOld
ken-matsui Dec 16, 2023
32810f7
Color log
ken-matsui Dec 16, 2023
0667f69
Fix arg
ken-matsui Dec 16, 2023
b2e6f59
macOS CI
ken-matsui Dec 16, 2023
17285ca
macOS CI
ken-matsui Dec 16, 2023
56cf4fd
Linux CI & disable cpplint
ken-matsui Dec 16, 2023
108bee8
Merge branch 'main' into stop-modules
ken-matsui Dec 16, 2023
a9375f0
error propagation
ken-matsui Dec 16, 2023
84cc89c
comment
ken-matsui Dec 16, 2023
3d54d61
CodeQL
ken-matsui Dec 16, 2023
c06c1c3
More argument propagation
ken-matsui Dec 16, 2023
06bf4a4
Build profile handling
ken-matsui Dec 16, 2023
c372d56
flexibility
ken-matsui Dec 16, 2023
e217d2e
Better error propagation
ken-matsui Dec 16, 2023
07bed04
Build profile dependent directory structure
ken-matsui Dec 16, 2023
06a2f69
Fix CI
ken-matsui Dec 16, 2023
270c549
fix
ken-matsui Dec 16, 2023
9edba48
More CI tests
ken-matsui Dec 16, 2023
7f82b6c
More CI tests
ken-matsui Dec 16, 2023
430597e
More CI tests
ken-matsui Dec 16, 2023
efaf354
Follow original directory structure
ken-matsui Dec 16, 2023
76e21d2
Add some tests
ken-matsui Dec 16, 2023
4e780e5
More CI tests
ken-matsui Dec 16, 2023
d65e056
Update test
ken-matsui Dec 16, 2023
dc57ef2
Add more tests
ken-matsui Dec 16, 2023
c9b40cc
BuildConfig
ken-matsui Dec 16, 2023
2db6af8
Correctly handle out dir
ken-matsui Dec 16, 2023
64093f6
Remove CMakeLists.txt
ken-matsui Dec 16, 2023
8b669fe
Support various soruce file extensions & Makefile regeneration optimi…
ken-matsui Dec 16, 2023
f26accf
More inner dir
ken-matsui Dec 16, 2023
c9d627c
Implement test command
ken-matsui Dec 16, 2023
7178caf
Test with Poac on CI
ken-matsui Dec 16, 2023
e5ec9c5
Better Makefile generation
ken-matsui Dec 16, 2023
f4398d1
Add TODO comments
ken-matsui Dec 16, 2023
3666529
Better error propagation
ken-matsui Dec 16, 2023
f89fd2e
Help restructure
ken-matsui Dec 16, 2023
ee054b8
Run: argument prop
ken-matsui Dec 16, 2023
f99c129
Remove srcOld/Util/Termcolor2
ken-matsui Dec 16, 2023
fa04269
Remove old build & run impls
ken-matsui Dec 16, 2023
feb04f1
Improve arg parse
ken-matsui Dec 16, 2023
4fa681c
Implement lev distance
ken-matsui Dec 18, 2023
795cd35
Include variant
ken-matsui Dec 18, 2023
3890215
Remove srcOld/Util/LevDistance.hpp
ken-matsui Dec 18, 2023
1e77d14
Run tests with debug
ken-matsui Dec 18, 2023
81688fa
Command suggestion
ken-matsui Dec 18, 2023
ca37d4f
Stop maintaining etc dir
ken-matsui Dec 18, 2023
bca117e
Support building as release
ken-matsui Dec 18, 2023
ecd7d8b
Remove build_type from CI; it does not matter
ken-matsui Dec 18, 2023
4d3d94c
Update Linux CI
ken-matsui Dec 18, 2023
d3362eb
Implement `new` command
ken-matsui Dec 18, 2023
bc05572
Test new project
ken-matsui Dec 18, 2023
873b75f
Test new project
ken-matsui Dec 18, 2023
661e75e
Use contains instead of count == 0
ken-matsui Dec 18, 2023
5ff3fd2
Remove srcOld/Cmd/Publish
ken-matsui Dec 18, 2023
f892965
Remove srcOld/Cmd/Login
ken-matsui Dec 18, 2023
1615a4f
Update poac.toml
ken-matsui Dec 18, 2023
4c2956f
Improved outputs
ken-matsui Dec 18, 2023
990de25
Avoid using chrono
ken-matsui Dec 18, 2023
832ce6a
Better output for run
ken-matsui Dec 18, 2023
374a802
Better output
ken-matsui Dec 18, 2023
441e419
Better test output
ken-matsui Dec 18, 2023
4d5311d
Better test output
ken-matsui Dec 18, 2023
663f7ea
Specify --no-print-directory
ken-matsui Dec 18, 2023
a66ac12
Use correct compiler
ken-matsui Dec 18, 2023
45b2fa8
Try more compilers
ken-matsui Dec 18, 2023
8c6a34e
Fix linux CI
ken-matsui Dec 18, 2023
5dcbd31
Remove clang 12
ken-matsui Dec 18, 2023
5720223
Simplify CI
ken-matsui Dec 18, 2023
00f9be5
Simplify CI
ken-matsui Dec 18, 2023
d743064
Update Logger.hpp
ken-matsui Dec 18, 2023
03981ae
Improve Logger interface
ken-matsui Dec 18, 2023
3a129a6
Implement `clean` command
ken-matsui Dec 18, 2023
9d73d43
Remove result
ken-matsui Dec 18, 2023
8043581
Better --quiet
ken-matsui Dec 18, 2023
24d3d2e
Add comment
ken-matsui Dec 18, 2023
56c8fed
Implement `init` command
ken-matsui Dec 18, 2023
712a3ca
Remove srcOld/main.cc
ken-matsui Dec 18, 2023
c58ef9e
Remove cmake
ken-matsui Dec 18, 2023
83644df
Use CXX env
ken-matsui Dec 19, 2023
ce108b4
noexcept
ken-matsui Dec 19, 2023
b0423c3
Remove unused term colors
ken-matsui Dec 19, 2023
c74f151
Remove unused term colors
ken-matsui Dec 19, 2023
0c085f8
Some arg parse improvements
ken-matsui Dec 20, 2023
fe592af
Streamline argument parsing
ken-matsui Dec 20, 2023
8603145
Add --help option
ken-matsui Dec 20, 2023
4bc5fee
CLI arg parse consistency
ken-matsui Dec 20, 2023
470cfe8
Fix Version.cc
ken-matsui Dec 20, 2023
78aaef0
Remove srcOld/Util/Format.hpp
ken-matsui Dec 20, 2023
fa83df1
Remove srcOld/Util/Verbosity.hpp
ken-matsui Dec 20, 2023
bb3bcb6
Format Makefile
ken-matsui Dec 20, 2023
d951096
Fix Version.hpp
ken-matsui Dec 20, 2023
b4248af
Fix case
ken-matsui Dec 20, 2023
13132dd
Add isVerbose and isQuiet
ken-matsui Dec 20, 2023
d2f7be4
Verbosity depending Makefile
ken-matsui Dec 20, 2023
b70bcd2
Format Makefile
ken-matsui Dec 20, 2023
436ab78
Move Logger definitions
ken-matsui Dec 20, 2023
7f7ff55
Remove unnecessary includes
ken-matsui Dec 20, 2023
faacc7d
Remove unnecessary dependency
ken-matsui Dec 20, 2023
19b6247
Support POAC_TERM_COLOR
ken-matsui Dec 20, 2023
d96a57d
Fix color handling
ken-matsui Dec 20, 2023
438a31c
Remove unnecessary comment
ken-matsui Dec 20, 2023
170c3e8
Remove srcOld/Util/Rustify.hpp
ken-matsui Dec 20, 2023
d27ac5b
Remove srcOld/Util/Misc.hpp
ken-matsui Dec 20, 2023
b14048f
Remove srcOld/Util/Log.hpp
ken-matsui Dec 20, 2023
aedf16d
new handling
ken-matsui Dec 20, 2023
b831fda
update
ken-matsui Dec 20, 2023
44a9776
Better Makefile
ken-matsui Dec 20, 2023
2db0751
Remove srcOld/Util/Pretty.hpp
ken-matsui Dec 20, 2023
99b91d2
Remove srcOld/Util/Shell.hpp
ken-matsui Dec 20, 2023
b1226e3
Implement Manifest
ken-matsui Dec 21, 2023
b9d49c7
Fix Makefile
ken-matsui Dec 21, 2023
1c716fc
Fix template
ken-matsui Dec 21, 2023
8cb46c6
Drop clang 13 and 14 support
ken-matsui Dec 21, 2023
c1e83fb
Use chrono for Build
ken-matsui Dec 21, 2023
87143c3
Use chrono for Test
ken-matsui Dec 21, 2023
852a1fe
Enable toml color
ken-matsui Dec 21, 2023
3b20406
Disable toml prefix
ken-matsui Dec 21, 2023
14cd8ca
const ref for dependsOn
ken-matsui Dec 21, 2023
5450a2c
Enable gcc 13 CI
ken-matsui Dec 21, 2023
09f7d52
Simplify path
ken-matsui Dec 21, 2023
637d930
Simplify BuildConfig
ken-matsui Dec 21, 2023
e6b322e
Improve colorization
ken-matsui Dec 21, 2023
b0fbf96
Improve edition validation
ken-matsui Dec 21, 2023
3c242a5
Support Git Dependencies
ken-matsui Dec 21, 2023
2b09fb4
Tweak git deps
ken-matsui Dec 21, 2023
bb68ee1
Fix src/Manifest.cc
ken-matsui Dec 21, 2023
7321b10
Correct exitCode calculation
ken-matsui Dec 21, 2023
7a9ac2f
Color compilation
ken-matsui Dec 21, 2023
494a411
Fix header-object resolution
ken-matsui Dec 21, 2023
5d6f31f
Fix color option
ken-matsui Dec 21, 2023
30f0e8b
Some improvements
ken-matsui Dec 21, 2023
b7f0c00
Fix Manifest.cc
ken-matsui Dec 21, 2023
d5b856f
packageName verification
ken-matsui Dec 21, 2023
ede2d93
update
ken-matsui Dec 21, 2023
d928525
Implement `fmt` command
ken-matsui Dec 21, 2023
a3c40a4
Implement `lint` command and performance improvements
ken-matsui Dec 22, 2023
0487732
Use string_view more
ken-matsui Dec 22, 2023
1b07927
Include
ken-matsui Dec 22, 2023
c32ca81
fix
ken-matsui Dec 22, 2023
31cf71e
Remove unused args from template
ken-matsui Dec 22, 2023
6cbf1e4
Remove
ken-matsui Dec 22, 2023
f97bd48
unused
ken-matsui Dec 22, 2023
419e66d
style
ken-matsui Dec 22, 2023
d2f4b0a
Update README
ken-matsui Dec 22, 2023
f642ae2
Update README
ken-matsui Dec 22, 2023
d0f039c
Update README
ken-matsui Dec 22, 2023
3b2bd83
Update README
ken-matsui Dec 22, 2023
75b959c
Update README
ken-matsui Dec 22, 2023
317e61a
Update README
ken-matsui Dec 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Logger.hpp
ken-matsui committed Dec 18, 2023

Verified

This commit was signed with the committer’s verified signature.
ken-matsui Ken Matsui
commit d743064978ff790b1914c282cba30d0676b8ca39
24 changes: 16 additions & 8 deletions src/Logger.hpp
Original file line number Diff line number Diff line change
@@ -21,30 +21,38 @@ class Logger {

template <typename... Args>
static void error(Args&&... message) {
getInstance().log(
std::cerr, LogLevel::error, std::forward<Args>(message)..., '\n'
getInstance().logln(
std::cerr, LogLevel::error, std::forward<Args>(message)...
);
}
template <typename... Args>
static void warn(Args&&... message) {
getInstance().log(
std::cout, LogLevel::warning, std::forward<Args>(message)..., '\n'
getInstance().logln(
std::cout, LogLevel::warning, std::forward<Args>(message)...
);
}
template <typename T, typename... Args>
static void status(T&& header, Args&&... message) {
getInstance().log(
getInstance().logln(
std::cout, LogLevel::status, std::forward<T>(header),
std::forward<Args>(message)..., '\n'
std::forward<Args>(message)...
);
}
template <typename... Args>
static void debug(Args&&... message) {
getInstance().log(
std::cout, LogLevel::debug, std::forward<Args>(message)..., '\n'
getInstance().logln(
std::cout, LogLevel::debug, std::forward<Args>(message)...
);
}

template <typename T, typename... Args>
void logln(
std::ostream& os, LogLevel messageLevel, T&& header, Args&&... message
) {
log(os, messageLevel, std::forward<T>(header),
std::forward<Args>(message)..., '\n');
}

template <typename T, typename... Args>
void
log(std::ostream& os, LogLevel messageLevel, T&& header, Args&&... message) {