Skip to content

Refacto/cmake - #707

Closed
SuperFola wants to merge 2 commits into
devfrom
refacto/cmake
Closed

Refacto/cmake#707
SuperFola wants to merge 2 commits into
devfrom
refacto/cmake

Conversation

@SuperFola

Copy link
Copy Markdown
Member

Description

Refactor CMakeLists to split the targets into their own file.

Checklist

  • I have read the Contributor guide
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation if needed (on https://github.com/ArkScript-lang/website, content/docs/)
  • I have added tests that prove my fix/feature is working
  • New and existing tests pass locally with my changes
  • I confirm that I am the author of this code and release it to the ArkScript project under the MPL-2.0 license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

@github-actions

Copy link
Copy Markdown

Static analysis report

Lizard report

Listing only functions with cyclomatic complexity >= 15 or NLOC >= 100 or parameters >= 6.

Report about files you didn't modify in this PR
FilenameStart line:end lineFunction nameParametersNLOCCCN
src/arkreactor/VM/VM.cpp457:2165Ark::VM::unsafeRun21437283
src/arkreactor/Compiler/Macros/Processor.cpp259:643Ark::internal::MacroProcessor::evaluate3353119
src/arkreactor/Compiler/BytecodeReader.cpp385:596Ark::BytecodeReader::display417192
src/arkscript/main.cpp24:391main231745
src/arkreactor/Error/Diagnostics.cpp45:192Ark::Diagnostics::makeContext410944
src/arkreactor/Compiler/AST/Parser.cpp841:975Ark::internal::Parser::string113142
src/arkscript/JsonCompiler.cpp27:276JsonCompiler::_compile121438
src/arkreactor/Compiler/NameResolution/NameResolutionPass.cpp163:268Ark::internal::NameResolutionPass::visitKeyword38535
src/arkreactor/Builtins/Slice.cpp21:93Ark::internal::Builtins::slice16334
src/arkreactor/Compiler/Lowerer/ASTLowerer.cpp361:440Ark::internal::ASTLowerer::compileListInstruction36432
src/arkreactor/Compiler/Lowerer/ASTLowerer.cpp212:322Ark::internal::ASTLowerer::compileExpression59231
src/arkreactor/Compiler/Lowerer/ASTLowerer.cpp891:1039Ark::internal::ASTLowerer::handleFunctionCall311631
src/arkreactor/Compiler/AST/Node.cpp179:285Ark::internal::Node::repr09030
src/arkreactor/Compiler/Macros/Processor.cpp107:191Ark::internal::MacroProcessor::processNode36328
src/arkreactor/Compiler/AST/Node.cpp287:368Ark::internal::Node::debugPrint17026
src/arkreactor/Compiler/BytecodeReader.cpp612:713Ark::BytecodeReader::printInstruction79825
src/arkreactor/TypeChecker.cpp149:236Ark::types::generateError67525
src/arkreactor/Compiler/NameResolution/StaticScope.cpp70:124Ark::internal::NamespaceScope::get34224
src/arkreactor/TypeChecker.cpp32:147Ark::types::displayContract610224
src/arkreactor/Compiler/NameResolution/NameResolutionPass.cpp57:161Ark::internal::NameResolutionPass::visit28323
src/arkreactor/Compiler/AST/Parser.cpp289:417Ark::internal::Parser::import_19823
include/utf8.hpp138:184utf8::isValid14421
src/arkreactor/VM/Value/Value.cpp81:149Ark::Value::toString25421
src/arkreactor/Compiler/IntermediateRepresentation/IRInliner.cpp258:330Ark::internal::IRInliner::extractPagesMetadata16321
src/arkreactor/VM/VM.cpp2319:2413Ark::VM::backtrace38120
src/arkreactor/Compiler/AST/Optimizer.cpp35:85Ark::internal::Optimizer::countAndPruneDeadCode14220
src/arkreactor/Compiler/Lowerer/ASTLowerer.cpp520:613Ark::internal::ASTLowerer::compileFunction36719
src/arkreactor/Compiler/IntermediateRepresentation/IRInliner.cpp128:189Ark::internal::IRInliner::isBuiltinProxy14819
src/arkreactor/Builtins/String.cpp47:113fmt::formatter::parse15918
src/arkreactor/Compiler/Lowerer/ASTLowerer.cpp837:889Ark::internal::ASTLowerer::handleOperator34218
src/arkreactor/Compiler/AST/Optimizer.cpp87:144Ark::internal::Optimizer::pruneUnusedGlobalVariables15018
src/arkscript/Formatter.cpp212:274Formatter::format35918
src/arkscript/Formatter.cpp527:585Formatter::formatCall25018
src/arkreactor/Compiler/Lowerer/ASTLowerer.cpp107:129Ark::internal::ASTLowerer::nodeProducesOutput11817
src/arkreactor/Compiler/Lowerer/ASTLowerer.cpp635:683Ark::internal::ASTLowerer::compileLetMutSet44017
src/arkreactor/Compiler/Macros/Executors/Function.cpp16:89Ark::internal::FunctionExecutor::applyMacro25617
include/Ark/Compiler/AST/Predicates.hpp142:166Ark::internal::IsSymbol::operator ( )12416
src/arkscript/Formatter.cpp324:366Formatter::formatFunction23616
src/arkreactor/VM/VM.cpp2177:2234Ark::VM::throwArityError44715
src/arkreactor/Compiler/Macros/Executors/Function.cpp99:156Ark::internal::FunctionExecutor::unify55015
src/arkreactor/Compiler/IntermediateRepresentation/IROptimizer.cpp22:259Ark::internal::IROptimizer::IROptimizer121512
src/arkreactor/Builtins/Time.cpp72:92Ark::internal::Builtins::Time::makeTimestamp6205
src/arkreactor/Error/Diagnostics.cpp194:211Ark::Diagnostics::helper7172

CppCheck report

Report files about files you didn't modify in this PR
FilenameLineTypeDescription
include/Ark/VM/VM.inl267styleVariable 'maybe_value_ptr' can be declared as pointer to const
src/arkreactor/Builtins/Bytecode.cpp23styleParameter 'vm' can be declared as pointer to const
src/arkreactor/Builtins/Time.cpp32styleParameter 'n' can be declared as reference to const
src/arkreactor/Compiler/BytecodeReader.cpp20performanceVariable 'm_arg_kinds' is assigned in constructor body. Consider performing initialization in initialization list.
src/arkreactor/Compiler/Lowerer/ASTLowerer.cpp658styleConsider using std::count_if algorithm instead of a raw loop.
src/arkreactor/Compiler/Lowerer/LocalsLocator.cpp26styleThe scope of the variable 'data' can be reduced.
src/arkreactor/Compiler/NameResolution/ScopeResolver.cpp136styleConsider using std::find_if algorithm instead of a raw loop.
src/arkreactor/State.cpp183styleVariable 'bytecode_hash' is assigned a value that is never used.
src/arkreactor/VM/Debugger.cpp352styleParameter 'context' can be declared as reference to const
src/arkreactor/VM/SharedLibrary.cpp0informationToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.
src/arkreactor/VM/VM.cpp0informationToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.
src/arkreactor/VM/VM.cpp281errorIterators of different containers 'm_execution_contexts.emplace_back(std::make_unique())' and 'm_execution_contexts.front()' are used together.
include/Ark/VM/Value/Future.hpp50styleUnused private function: 'Future::deleteSelfViaVM'
src/arkreactor/VM/Value/Future.cpp23performanceVariable 'm_value' is assigned in constructor body. Consider performing initialization in initialization list.

@SuperFola

Copy link
Copy Markdown
MemberAuthor

Alas this isn't doable as I wanted to, it seems. It needs a unique build directory per CMake subdirectory...

@SuperFola
SuperFola deleted the refacto/cmake branch August 15, 2026 14:28
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@SuperFola