Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Initial dev #1

Merged
merged 108 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
9523e74
Initial development. Incomplete, but ready for a merge into main.
ScottBailey Jan 26, 2023
c925624
clang-format
ScottBailey Jan 26, 2023
eea7e9e
License for libsb
ScottBailey Jan 27, 2023
6c549a8
remove unused dependency files
ScottBailey Jan 27, 2023
abf8335
Added README and LICENSE files.
ScottBailey Jan 27, 2023
1c59d86
Fix for use with CMake v3.11.
ScottBailey Jan 27, 2023
25c8dee
Added line number
ScottBailey Jan 27, 2023
8681fa2
Added line number
ScottBailey Jan 27, 2023
af75af7
Added comment regarding ninja
ScottBailey Jan 27, 2023
3bef6c8
Added comment regarding ninja and fectContents
ScottBailey Jan 27, 2023
caa6f2c
Added comment regarding ninja test
ScottBailey Jan 27, 2023
3052f04
Corrected FetchContent note and added link.
ScottBailey Jan 28, 2023
8217d33
Corrected FetchContent note and added link.
ScottBailey Jan 28, 2023
5169132
Remove accidentally commited development test file.
ScottBailey Jan 30, 2023
8ddee7f
Add documentation.
ScottBailey Jan 30, 2023
a36c663
Finished documentation, changed a test to use a std:: function
ScottBailey Jan 31, 2023
6ca822c
Error removal.
ScottBailey Jan 31, 2023
e056235
Name change.
ScottBailey Jan 31, 2023
06f090d
Remove unused comments.
ScottBailey Jan 31, 2023
0aa4ea4
Improved error checking.
ScottBailey Jan 31, 2023
50d649e
Language enum becomes more robust with case insensitivity.
ScottBailey Jan 31, 2023
436f36c
Added comments and moved generic code into function.
ScottBailey Jan 31, 2023
a060a6d
Use brief_str as the brief for --help in addition to --brief.[C
ScottBailey Feb 1, 2023
9f241eb
Clean up for PR comments.
ScottBailey Feb 2, 2023
bbc1696
Remove ninja from build instructions.
ScottBailey Feb 2, 2023
017ddac
Following along with leap...
ScottBailey Feb 3, 2023
65668c3
Following along with leap... but not too close.
ScottBailey Feb 3, 2023
552bdf8
Move .h files to .hpp.
ScottBailey Feb 3, 2023
cfb38d5
Switch from ifndef/define/endif inclusions to pragma once
ScottBailey Feb 3, 2023
20b0470
Addressing PR comment: remove non-Linux build support.
ScottBailey Feb 3, 2023
7352498
Allow CMake to put built files in default locations.
ScottBailey Feb 3, 2023
6228a39
Correct inclusion deficiency.
ScottBailey Feb 3, 2023
7dcc4b8
Switch from libsb to eosio::cdt.
ScottBailey Feb 3, 2023
8a44ef0
Switch from libsb to eosio::cdt.
ScottBailey Feb 3, 2023
56418e4
Inclusion fix
ScottBailey Feb 4, 2023
8c586a1
spelling
ScottBailey Feb 4, 2023
90bae45
Switch to nested namespaces. e.g. --> .
ScottBailey Feb 5, 2023
c68e843
Switch ryml to 0.5.0 and add boost as a dependency.
ScottBailey Feb 6, 2023
5c1c8d8
additional files that should have been removed.
ScottBailey Feb 6, 2023
870b447
Cleanup: make system/exec header only into a normal hpp/cpp pair.
ScottBailey Feb 6, 2023
2cd69d5
Fix typo
ScottBailey Feb 8, 2023
3095fe4
Addressed PR comments.
ScottBailey Feb 8, 2023
50e7b92
Switch to boost::is_any_of() for consistency.
ScottBailey Feb 8, 2023
2d6844f
Provide actual minimum compiler versions in README and also correct C…
ScottBailey Feb 8, 2023
d9add57
PR comment fixes.
ScottBailey Feb 8, 2023
0b5d6bd
Adding minimum compiler fatal error and warning messages.
ScottBailey Feb 8, 2023
801d376
Adding nested namespace
Feb 9, 2023
fb5156e
Add explicit in two places
mikelik Feb 9, 2023
d94f1a2
Adding to this imported file.
ScottBailey Feb 9, 2023
2f49a58
Removed deprecated trouble shooting section.
ScottBailey Feb 9, 2023
baf0ce9
Dump ugly CDT whereami() in favor of boost::dll::program_location()
ScottBailey Feb 9, 2023
5453e1f
Simplify naming of output to removed redundancy: i.e. test/test_X -->…
ScottBailey Feb 9, 2023
fb3e93a
Convert strig::from<>() to use std::chars() internally.
ScottBailey Feb 9, 2023
2d93534
Remove macro, simply build strings in place.
ScottBailey Feb 10, 2023
6c2572d
Further cleanup of trim() - reconsidered iterators.
ScottBailey Feb 10, 2023
a1c900e
move ryml files around a bit.
ScottBailey Feb 11, 2023
d434cea
Switch to CLI11 for cli parsing.
ScottBailey Feb 11, 2023
a550505
Use CLI11 for CLI parsing.
ScottBailey Feb 13, 2023
09866f1
Use CLI11 for parsing in 'aproj' executable.
ScottBailey Feb 15, 2023
7352c88
fix shadow variable issue.
ScottBailey Feb 15, 2023
59ef200
added sourced from line
ScottBailey Feb 15, 2023
5253a58
Remove CASE_OF macros in favor of magic_enum.
ScottBailey Feb 15, 2023
b2a7775
Convert from custom three way comparison to C++20 operator<=>().
ScottBailey Feb 17, 2023
f5e8a06
Using older / built in versions of Boost, so don't require CONFIG.
ScottBailey Feb 20, 2023
00a8df1
aproj requires libdl for some compilers.
ScottBailey Feb 20, 2023
140bea2
magic enum should have been committed in 5253a58ec2c9fa1d1050179791db…
ScottBailey Feb 20, 2023
916b804
Attempt to simplify interactive logic to improve maintenance.
ScottBailey Feb 20, 2023
cb4217b
Sync these two files a bit better.
ScottBailey Feb 20, 2023
a9c22b5
Convert infinte loops to be clearer.
ScottBailey Feb 21, 2023
75f2d15
Simplified common_init to use CLI11 for indirect and brief flags, rem…
ScottBailey Feb 22, 2023
1d15dac
Revert aproj.cpp to baf0ce95ca7f03622db125b00cf59b7e6d192156 and add …
ScottBailey Feb 22, 2023
4b7e1c3
Clean up.
ScottBailey Feb 22, 2023
623a57c
Add 3rd party licenses and copy all licenses to legacy required locat…
ScottBailey Feb 28, 2023
c94913c
Address PR comment
ScottBailey Feb 28, 2023
d8c5a08
Remove cruft.
ScottBailey Feb 28, 2023
0b8e1ee
Fix sanity checking.
ScottBailey Feb 28, 2023
d5fb4c7
removed dead code
ScottBailey Feb 28, 2023
b217e9a
pr comment: loop
ScottBailey Feb 28, 2023
9494963
c++17 changes and starting changes to aproj binaries
Mar 1, 2023
3b216bb
Address PR comment: remove commented out code.
ScottBailey Mar 1, 2023
b920383
Removed commented out code.
ScottBailey Mar 1, 2023
89c780f
typo
ScottBailey Mar 1, 2023
f9b970c
std::from_chars works A LOT better than is >> uint8_t
ScottBailey Mar 1, 2023
e9dae2d
remove unused code
ScottBailey Mar 1, 2023
bbfb299
PR comment
ScottBailey Mar 1, 2023
a2262a9
PR comment - remove commented out code
ScottBailey Mar 1, 2023
4531e78
some more fixes
Mar 1, 2023
1e59f11
remove commented out code
ScottBailey Mar 1, 2023
f3b34b8
commented out code.
ScottBailey Mar 1, 2023
cc5f9f8
Overflow test fix.
ScottBailey Mar 1, 2023
ae4006c
some more updates
Mar 1, 2023
575df71
added update for all types, fixed bugs, cleaned up location
Mar 2, 2023
20f2029
restructuring, remove unneeded code, refactoring to resolve some bugs
Mar 3, 2023
c627c4a
more fixups and cleanup
Mar 4, 2023
d8da40a
some more changes
Mar 5, 2023
f04c718
adding cmake population, stub app and lib support
Mar 6, 2023
eddf50a
added building
Mar 6, 2023
ab35142
add lib support
Mar 6, 2023
9d9830a
fixes for deps
Mar 6, 2023
2c4df7f
Update to v2.13.9 for gcc10 and clang14
ScottBailey Mar 6, 2023
f617a17
Correct version constraint decode and renable additional testing.
ScottBailey Mar 6, 2023
9bfb93f
Correct version constraint decode and renable additional testing.
ScottBailey Mar 6, 2023
866a8f2
Fix clang-tidy warnings
Mar 9, 2023
16512c3
Merge pull request #11 from AntelopeIO/mikelik/clang-tidy
ScottBailey Mar 13, 2023
fc772a7
Merge pull request #9 from AntelopeIO/larryk85/proj-changes
ScottBailey Mar 13, 2023
d8824b8
Adding submodule note.
ScottBailey Mar 13, 2023
17c44e4
correct CMakeLists so project can be included as submodule
dimas1185 Mar 14, 2023
86ad4fd
Merge pull request #15 from AntelopeIO/enable-submodule-add
dimas1185 Mar 14, 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
137 changes: 137 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
---
Language: Cpp
# BasedOnStyle: Mozilla
AccessModifierOffset: -3
AlignAfterOpenBracket: Align
AlignArrayOfStructures: Left
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeComma
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 3
ContinuationIndentWidth: 3
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: true
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 3
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 3
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 3
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: false
PenaltyBreakAssignment: 3
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
...
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[Bb]uild*/*
CMakeLists.txt.user
CMakeLists.txt.user
*.md.backup
25 changes: 25 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.11)

ScottBailey marked this conversation as resolved.
Show resolved Hide resolved
project("Antelope Project Management System")
ScottBailey marked this conversation as resolved.
Show resolved Hide resolved

# Add dependent libraries.
# Make sure this happens BEFORE we include our common settings,
# otherwise we'll be compiling outside libraries with -Wall,
# -Wextra, -Werror
add_subdirectory( depends )

# Add some common stuff.
include( ./common.cmake REQUIRED )


add_subdirectory( common )
add_subdirectory( project )
add_subdirectory( aproj )
#add_subdirectory( aproj-qt )


option(BUILD_TESTS "Build and run the tests." On)
if(BUILD_TESTS)
enable_testing()
add_subdirectory( test )
endif()
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2022-current EOS Network Foundation (ENF) and its contributors.
All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
90 changes: 88 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,93 @@
# ANTLER Project Tools
ScottBailey marked this conversation as resolved.
Show resolved Hide resolved

# Antelope Project Management System
ANTLER Project Tools (aproj) is a set of tools to help in the
generation of smart contracts intended for deployment to an
[Antelope](https://github.com/AntelopeIO/) blockchain.

This set of tools will help the developer create, maintain, build, and
test smart contracts.

## See

## Usage

For now, please see the [Intial Design Document](./docs/project_manager.md) for usage.

## Runtime Dependencies

The following tools are required for aproj to work at runtime:
ScottBailey marked this conversation as resolved.
Show resolved Hide resolved
- CMake v3.11
- aproj requires [`gh`](https://cli.github.com/). Note that you may need
ScottBailey marked this conversation as resolved.
Show resolved Hide resolved
to [authenticate](https://cli.github.com/manual/) before this will
work.


## Build Dependencies

Building aproj requires the following dependencies:
- C++20 compiler (e.g. gcc-10 or clang-13).
ScottBailey marked this conversation as resolved.
Show resolved Hide resolved
- [CMake](https://cmake.org/overview/) version 3.11 or greater (note the requirement [here](./CMakeLists.txt#L1)).

Additionally we recomend using [ninja build](https://ninja-build.org/) for fast builds.
ScottBailey marked this conversation as resolved.
Show resolved Hide resolved


## Building

Assuming you have ninja and the other dependencies installed, from the project root, the following will build the project:
```bash
mkdir -p Build \
&& cd Build \
&& cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
&& cmake --build .
ScottBailey marked this conversation as resolved.
Show resolved Hide resolved
```

Note that CMake's FetchDependencies command is used. It occasiaonally
errors out. If this happens, it may be necessary to remove the `_deps`
directory from your build directory.
ScottBailey marked this conversation as resolved.
Show resolved Hide resolved

## Test

Currently, the following will run some automated tests:
```bash
ninja && ninja test
```

## Maintaining

Directories in the project root:
- aproj: This contains the various CLI tools, all of which depend on the project library.
- common: This contains a common library that might be useful elsewhere and parts of libsb, a 3rd party utility library.
- project: This is standalone library that contains the majority of implementation that creates and maintains the `project.yaml` file as well as initialize and populate the project's directory tree, among other things.
- test: This direcory contains a number of unit tests. In future, it's likely to contain system level tests as well.
- depends: This directory contains the CMake instructions for including libraries.


## License

The majority of this project is licensed using the MIT License as
found [here](./LICENSE).

A [few files](./common/sb) are directly included from
[libsb](https://github.com/ScottBailey/libsb), which uses the
`BSD-3-Clause` license. Note that these files independently contain
their own license information.

Additionally, apack depends on [Rapid YAML](https://github.com/biojppm/rapidyaml),
which uses the `MIT` license.


## Miscellaneous

### What does `aproj` stand for?

It's a shortening of `antler-proj`.

### Is ANTLER an acronym?

Yes, it is. Or maybe it's a
[backronym](https://en.wikipedia.org/wiki/Backronym)?

Regardless, it's ANother TransLator Environment and Runtime.

### Initial Issue

https://github.com/AntelopeIO/cdt/issues/62
26 changes: 26 additions & 0 deletions aproj/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

#
# These files are generally built in a common way, so here are some functions to simplify the process.
#

function(add_aproj target_name files)
add_executable(${target_name} ${files})
set_property(TARGET ${target_name} PROPERTY CXX_STANDARD 20)
target_link_libraries(${target_name} PUBLIC antler-project)
target_include_directories(${target_name} PRIVATE . )
install(FILES $<TARGET_FILE:${target_name}> COMPONENT Runtime DESTINATION .)
endfunction()


file(GLOB src_cpp ./*.cpp)

foreach(file_name IN ITEMS ${src_cpp})
if(${CMAKE_VERSION} VERSION_LESS "3.20")
get_filename_component(fn ${file_name} NAME)
else()
cmake_path(GET file_name FILENAME fn)
endif()

string(REPLACE ".cpp" "" name ${fn})
add_aproj("${name}" "${fn}")
endforeach()
Loading