From a4c9a6cc275d5f3368aab85fd5eac3673b890773 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Wed, 16 Aug 2023 11:08:20 +0200 Subject: [PATCH 01/23] Dependency - Removed swear words --- source/tlang/compiler/typecheck/dependency/core.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tlang/compiler/typecheck/dependency/core.d b/source/tlang/compiler/typecheck/dependency/core.d index 9699dfe..b7b9e60 100644 --- a/source/tlang/compiler/typecheck/dependency/core.d +++ b/source/tlang/compiler/typecheck/dependency/core.d @@ -718,7 +718,7 @@ public class DNodeGenerator expect("Only class-type may be used with `new`"); assert(false); } - gprintln("Poe naais"); + gprintln("King of the castle"); } else { From 2ed7e9f490bb9dc47d9df086292338bbb909ecf3 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Wed, 16 Aug 2023 11:09:03 +0200 Subject: [PATCH 02/23] Dependency - Removed debug print as this is done --- source/tlang/compiler/typecheck/dependency/core.d | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source/tlang/compiler/typecheck/dependency/core.d b/source/tlang/compiler/typecheck/dependency/core.d index b7b9e60..564723f 100644 --- a/source/tlang/compiler/typecheck/dependency/core.d +++ b/source/tlang/compiler/typecheck/dependency/core.d @@ -981,8 +981,6 @@ public class DNodeGenerator */ else if(cast(ArrayIndex)exp) { - gprintln("Working on expressionPass'ing of ArrayIndex", DebugType.ERROR); - ArrayIndex arrayIndex = cast(ArrayIndex)exp; // Set the context as we need to grab it later in the typechecker @@ -997,9 +995,6 @@ public class DNodeGenerator Expression indexedExp = arrayIndex.getIndexed(); DNode indexedExpDNode = expressionPass(indexedExp, context); dnode.needs(indexedExpDNode); - - - // assert(false); } else { From e5b0f4e0a1e464a1e858c4c481c6661e52b8b6d1 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Wed, 16 Aug 2023 11:10:02 +0200 Subject: [PATCH 03/23] Resolution - Removed swear words --- source/tlang/compiler/typecheck/resolution.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tlang/compiler/typecheck/resolution.d b/source/tlang/compiler/typecheck/resolution.d index d74f02c..b1adec2 100644 --- a/source/tlang/compiler/typecheck/resolution.d +++ b/source/tlang/compiler/typecheck/resolution.d @@ -219,7 +219,7 @@ public final class Resolver /* Try find the Entity within the current Contaier */ gprintln("resolveUp("~to!(string)(currentContainer)~", "~name~")"); Entity entity = resolveWithin(currentContainer, name); - gprintln("Poes"); + gprintln("Certified 2008 financial crisis moment"); gprintln(entity); /* If we found it return it */ From fd31024a0720841fcceb3c02de07091facc60326 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Wed, 16 Aug 2023 15:51:53 +0200 Subject: [PATCH 04/23] Compiler - Now lookup `dgen:mapper` instead of `emit:mapper` Configuration - Now set `dgen:mapper` to `hashmapper` instead of `emit:mapper` - Added `dgen_preinline_args` and set it to `false` Commands - Updated description for `symbol-mapper`/`sm` flag - The `symbol-mapper`/`sm` flag now affects the `dgen:mapper` entry instead of the `emit:mapper` entry - Transfer the flag value of `preinlineArguments`/`pia` to the `dgen:preinline_args` entry --- source/tlang/commandline/commands.d | 11 +++++++++-- source/tlang/compiler/configuration.d | 8 ++++---- source/tlang/compiler/core.d | 4 ++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/source/tlang/commandline/commands.d b/source/tlang/commandline/commands.d index dcd27a6..469692a 100644 --- a/source/tlang/commandline/commands.d +++ b/source/tlang/commandline/commands.d @@ -59,7 +59,7 @@ mixin template EmitBase() { @ArgGroup("Emit", "Options pertaining to the code emitter") { - @ArgNamed("symbol-mapper|sm", "The symbol mapping technique to use") + @ArgNamed("symbol-mapper|sm", "The symbol mapping technique to use for DGen (C emitter)") @(ArgConfig.optional) SymbolMappingTechnique symbolTechnique = SymbolMappingTechnique.HASHMAPPER; @@ -75,6 +75,10 @@ mixin template EmitBase() @(ArgConfig.optional) bool entrypointTestEmit = true; // TODO: Change this later to `false` of course + @ArgNamed("preinlineArguments|pia", "Whether or not to preinline function call arguments in DGen (C emitter)") + @(ArgConfig.optional) + bool preinlineArguments = false; // TODO: Change this later to `true` of course + @ArgNamed("library-link|ll", "Paths to any object files to ,ink in during the linking phase") @(ArgConfig.optional) @(ArgConfig.aggregate) @@ -84,7 +88,7 @@ mixin template EmitBase() void EmitBaseInit(Compiler compiler) { // Set the symbol mapper technique - compiler.getConfig().addConfig(ConfigEntry("emit:mapper", symbolTechnique)); + compiler.getConfig().addConfig(ConfigEntry("dgen:mapper", symbolTechnique)); // Set whether pretty-printed code should be generated compiler.getConfig().addConfig(ConfigEntry("dgen:pretty_code", prettyPrintCodeGen)); @@ -92,6 +96,9 @@ mixin template EmitBase() // Set whether or not to enable the entry point testing code compiler.getConfig().addConfig(ConfigEntry("dgen:emit_entrypoint_test", entrypointTestEmit)); + // Set whether or not to enable pre-inlining of function call arguments in DGen + compiler.getConfig().addConfig(ConfigEntry("dgen:preinline_args", preinlineArguments)); + // Set the paths to the object files to link in compiler.getConfig().addConfig(ConfigEntry("linker:link_files", bruh)); } diff --git a/source/tlang/compiler/configuration.d b/source/tlang/compiler/configuration.d index 310de28..28da661 100644 --- a/source/tlang/compiler/configuration.d +++ b/source/tlang/compiler/configuration.d @@ -200,8 +200,8 @@ public final class CompilerConfiguration /* Generate a fresh new config */ CompilerConfiguration config = new CompilerConfiguration(); - /* Enable Behaviour-C fixes */ - config.addConfig(ConfigEntry("behavec:preinline_args", true)); + /* Enable Behaviour-C fixes (TODO: This should be changed to true before release) */ + config.addConfig(ConfigEntry("dgen:preinline_args", false)); /* Enable pretty code generation for DGen */ config.addConfig(ConfigEntry("dgen:pretty_code", true)); @@ -209,8 +209,8 @@ public final class CompilerConfiguration /* Enable entry point test generation for DGen */ config.addConfig(ConfigEntry("dgen:emit_entrypoint_test", true)); - /* Set the mapping to hashing of entity names (TODO: This should be changed before release) */ - config.addConfig(ConfigEntry("emit:mapper", "hashmapper")); + /* Set the mapping to hashing of entity names for DGen (TODO: This should be changed before release) */ + config.addConfig(ConfigEntry("dgen:mapper", "hashmapper")); /** * Configure, at compile time, the system type aliases diff --git a/source/tlang/compiler/core.d b/source/tlang/compiler/core.d index 84d7049..2288be5 100644 --- a/source/tlang/compiler/core.d +++ b/source/tlang/compiler/core.d @@ -204,13 +204,13 @@ public class Compiler throw new CompilerException(CompilerError.TYPECHECK_NOT_YET_PERFORMED); } - if(!config.hasConfig("emit:mapper")) + if(!config.hasConfig("dgen:mapper")) { throw new CompilerException(CompilerError.CONFIG_ERROR, "Missing a symbol mapper"); } SymbolMapper mapper; - string mapperType = config.getConfig("emit:mapper").getText(); + string mapperType = config.getConfig("dgen:mapper").getText(); if(cmp(mapperType, "hashmapper") == 0) { From ef0c8172177dbd9e93e4a4a4201b7e48836703ff Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Thu, 17 Aug 2023 08:46:59 +0200 Subject: [PATCH 05/23] DGen - Instead of returning the generated C emit code, set it in a local scope but at the highest scope variable `emmmmit` --- source/tlang/compiler/codegen/emit/dgen.d | 97 +++++++++++++---------- 1 file changed, 55 insertions(+), 42 deletions(-) diff --git a/source/tlang/compiler/codegen/emit/dgen.d b/source/tlang/compiler/codegen/emit/dgen.d index d568986..449ea8b 100644 --- a/source/tlang/compiler/codegen/emit/dgen.d +++ b/source/tlang/compiler/codegen/emit/dgen.d @@ -141,6 +141,9 @@ public final class DCodeEmitter : CodeEmitter gprintln("transform(): "~to!(string)(instruction)); transformDepth++; + // The data to emit + string emmmmit; + // At any return decrement the depth scope(exit) { @@ -172,12 +175,12 @@ public final class DCodeEmitter : CodeEmitter { string renamedSymbol = mapper.symbolLookup(typedEntityVariable); - return renamedSymbol~" = "~transform(varAs.data)~";"; + emmmmit = renamedSymbol~" = "~transform(varAs.data)~";"; } /* If it is external */ else { - return typedEntityVariable.getName()~" = "~transform(varAs.data)~";"; + emmmmit = typedEntityVariable.getName()~" = "~transform(varAs.data)~";"; } } /* VariableDeclaration */ @@ -218,17 +221,18 @@ public final class DCodeEmitter : CodeEmitter gprintln("VarDec(with assignment): My assignment type is: "~varAssInstr.getInstrType().getName()); // Generate the code to emit - return typeTransform(cast(Type)varDecInstr.varType)~" "~renamedSymbol~" = "~transform(varAssInstr)~";"; + emmmmit = typeTransform(cast(Type)varDecInstr.varType)~" "~renamedSymbol~" = "~transform(varAssInstr)~";"; + } + else + { + emmmmit = typeTransform(cast(Type)varDecInstr.varType)~" "~renamedSymbol~";"; } - - return typeTransform(cast(Type)varDecInstr.varType)~" "~renamedSymbol~";"; } /* If the variable is external */ else { - return "extern "~typeTransform(cast(Type)varDecInstr.varType)~" "~typedEntityVariable.getName()~";"; + emmmmit = "extern "~typeTransform(cast(Type)varDecInstr.varType)~" "~typedEntityVariable.getName()~";"; } - } /* LiteralValue */ else if(cast(LiteralValue)instruction) @@ -237,7 +241,7 @@ public final class DCodeEmitter : CodeEmitter LiteralValue literalValueInstr = cast(LiteralValue)instruction; - return to!(string)(literalValueInstr.getLiteralValue()); + emmmmit = to!(string)(literalValueInstr.getLiteralValue()); } /* FetchValueVar */ else if(cast(FetchValueVar)instruction) @@ -257,12 +261,12 @@ public final class DCodeEmitter : CodeEmitter string renamedSymbol = mapper.symbolLookup(typedEntityVariable); - return renamedSymbol; + emmmmit = renamedSymbol; } /* If it is external */ else { - return typedEntityVariable.getName(); + emmmmit = typedEntityVariable.getName(); } } /* BinOpInstr */ @@ -320,7 +324,7 @@ public final class DCodeEmitter : CodeEmitter cvInstr.setRelax(true); } - return transform(binOpInstr.lhs)~to!(string)(getCharacter(binOpInstr.operator))~transform(binOpInstr.rhs); + emmmmit = transform(binOpInstr.lhs)~to!(string)(getCharacter(binOpInstr.operator))~transform(binOpInstr.rhs); } /* FuncCallInstr */ else if(cast(FuncCallInstr)instruction) @@ -370,7 +374,7 @@ public final class DCodeEmitter : CodeEmitter emit ~= ";"; } - return emit; + emmmmit = emit; } /* ReturnInstruction */ else if(cast(ReturnInstruction)instruction) @@ -384,7 +388,7 @@ public final class DCodeEmitter : CodeEmitter /* Get the return expression instruction */ Value returnExpressionInstr = returnInstruction.getReturnExpInstr(); - return "return "~transform(returnExpressionInstr)~";"; + emmmmit = "return "~transform(returnExpressionInstr)~";"; } /** * If statements (IfStatementInstruction) @@ -434,7 +438,7 @@ public final class DCodeEmitter : CodeEmitter } } - return emit; + emmmmit = emit; } /** * While loops (WhileLoopInstruction) @@ -464,7 +468,7 @@ public final class DCodeEmitter : CodeEmitter /* Closing curly brace */ emit~=genTabs(transformDepth)~"}"; - return emit; + emmmmit = emit; } /** * For loops (ForLoopInstruction) @@ -502,7 +506,7 @@ public final class DCodeEmitter : CodeEmitter // Close curly (body end) emit~=genTabs(transformDepth)~"}"; - return emit; + emmmmit = emit; } /** * Unary operators (UnaryOpInstr) @@ -521,7 +525,7 @@ public final class DCodeEmitter : CodeEmitter /* Transform the operand */ emit ~= transform(operandInstruction); - return emit; + emmmmit = emit; } /** * Pointer dereference assignment (PointerDereferenceAssignmentInstruction) @@ -551,7 +555,7 @@ public final class DCodeEmitter : CodeEmitter emit ~= transform(rhsAssExprInstr)~";"; - return emit; + emmmmit = emit; } /** * Discard instruction (DiscardInstruction) @@ -566,7 +570,7 @@ public final class DCodeEmitter : CodeEmitter /* Transform the expression */ emit ~= transform(valueInstruction)~";"; - return emit; + emmmmit = emit; } /** * Type casting instruction (CastedValueInstruction) @@ -593,29 +597,27 @@ public final class DCodeEmitter : CodeEmitter { /* The original expression */ emit ~= transform(uncastedInstruction); - return emit; - } - - /* Handling of primitive types */ - if(cast(Primitive)castingTo) - { - /* Add the actual cast */ - emit ~= "("~typeTransform(castingTo)~")"; - - /* The expression being casted */ - emit ~= transform(uncastedInstruction); } else { - // TODO: Implement this - gprintln("Non-primitive type casting not yet implemented", DebugType.ERROR); - assert(false); + /* Handling of primitive types */ + if(cast(Primitive)castingTo) + { + /* Add the actual cast */ + emit ~= "("~typeTransform(castingTo)~")"; + + /* The expression being casted */ + emit ~= transform(uncastedInstruction); + } + else + { + // TODO: Implement this + gprintln("Non-primitive type casting not yet implemented", DebugType.ERROR); + assert(false); + } } - - - - return emit; + emmmmit = emit; } /** * Array indexing (pointer-based arrays) @@ -655,7 +657,7 @@ public final class DCodeEmitter : CodeEmitter // return "*("~transform(indexed)~"+"~transform(index)~")"; - return emit; + emmmmit = emit; } /** * Array assignments (pointer-based arrays) @@ -701,7 +703,7 @@ public final class DCodeEmitter : CodeEmitter emit ~= ";"; - return emit; + emmmmit = emit; } /** * Array indexing (stack-based arrays) @@ -741,7 +743,7 @@ public final class DCodeEmitter : CodeEmitter // return "(TODO: Stack-array index emit)"; - return emit; + emmmmit = emit; } /** * Array assignments (stack-based arrays) @@ -785,12 +787,23 @@ public final class DCodeEmitter : CodeEmitter // return "(StackArrAssignmentInstr: TODO)"; - return emit; + emmmmit = emit; } // TODO: MAAAAN we don't even have this yet // else if(cast(StringExpression)) + /** + * Unsupported instruction + * + * If you get here then normally it's because + * you didn't implement a transformation for + * an instruction yet. + */ + else + { + emmmmit = ""; + } - return ""; + return emmmmit; } From 12daee5c4431e7de3ff5bf0ed3f6e8b97ef57f24 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Sun, 20 Aug 2023 15:26:54 +0200 Subject: [PATCH 06/23] DGen - Lookup the value of `dgen:compiler` from the config and use that as the C compiler Configuration - Set default value of `dgen:compiler` to `"clang"` Commands - Added a command to specify the C compile to use - Transfer `-cccompiler`/`-cc` over to a config entry --- source/tlang/commandline/commands.d | 7 +++++++ source/tlang/compiler/codegen/emit/dgen.d | 3 ++- source/tlang/compiler/configuration.d | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/source/tlang/commandline/commands.d b/source/tlang/commandline/commands.d index 469692a..54363b5 100644 --- a/source/tlang/commandline/commands.d +++ b/source/tlang/commandline/commands.d @@ -66,6 +66,10 @@ mixin template EmitBase() @ArgNamed("prettygen|pg", "Generate pretty-printed code") @(ArgConfig.optional) bool prettyPrintCodeGen = true; + + @ArgNamed("ccompiler|cc", "The system C compiler to use for DGne (C emitter)") + @(ArgConfig.optional) + string systemCC = "clang"; @ArgNamed("output|o", "Filename of generated object file") @(ArgConfig.optional) @@ -99,6 +103,9 @@ mixin template EmitBase() // Set whether or not to enable pre-inlining of function call arguments in DGen compiler.getConfig().addConfig(ConfigEntry("dgen:preinline_args", preinlineArguments)); + // Set the C compiler to use for DGen + compiler.getConfig().addConfig(ConfigEntry("dgen:compiler", systemCC)); + // Set the paths to the object files to link in compiler.getConfig().addConfig(ConfigEntry("linker:link_files", bruh)); } diff --git a/source/tlang/compiler/codegen/emit/dgen.d b/source/tlang/compiler/codegen/emit/dgen.d index 449ea8b..5824772 100644 --- a/source/tlang/compiler/codegen/emit/dgen.d +++ b/source/tlang/compiler/codegen/emit/dgen.d @@ -1286,7 +1286,8 @@ int main() try { //NOTE: Change to system compiler (maybe, we need to choose a good C compiler) - string[] compileArgs = ["clang", "-o", "tlang.out", file.name()]; + string systemCompiler = config.getConfig("dgen:compiler").getText(); + string[] compileArgs = [systemCompiler, "-o", "tlang.out", file.name()]; // Check for object files to be linked in string[] objectFilesLink; diff --git a/source/tlang/compiler/configuration.d b/source/tlang/compiler/configuration.d index 28da661..f6f1757 100644 --- a/source/tlang/compiler/configuration.d +++ b/source/tlang/compiler/configuration.d @@ -212,6 +212,9 @@ public final class CompilerConfiguration /* Set the mapping to hashing of entity names for DGen (TODO: This should be changed before release) */ config.addConfig(ConfigEntry("dgen:mapper", "hashmapper")); + /* Set the system C compiler for DGen to clang */ + config.addConfig(ConfigEntry("dgen:compiler", "clang")); + /** * Configure, at compile time, the system type aliases */ From c1da2e62964e50aee78f588bf78759effd03318b Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Sun, 20 Aug 2023 15:28:05 +0200 Subject: [PATCH 07/23] DGen - Removed now-completed NOTE comment - Print out the C compiler being used --- source/tlang/compiler/codegen/emit/dgen.d | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/tlang/compiler/codegen/emit/dgen.d b/source/tlang/compiler/codegen/emit/dgen.d index 5824772..f801f12 100644 --- a/source/tlang/compiler/codegen/emit/dgen.d +++ b/source/tlang/compiler/codegen/emit/dgen.d @@ -1285,8 +1285,9 @@ int main() { try { - //NOTE: Change to system compiler (maybe, we need to choose a good C compiler) string systemCompiler = config.getConfig("dgen:compiler").getText(); + gprintln("Using system C compiler '"~systemCompiler~"' for compilation"); + string[] compileArgs = [systemCompiler, "-o", "tlang.out", file.name()]; // Check for object files to be linked in From f7a863172928cbaa3dc8eebeb858e09af2e137de Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:10:50 +0200 Subject: [PATCH 08/23] Update d.yml --- .github/workflows/d.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 8ac0869..c37a97f 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -63,6 +63,8 @@ jobs: uses: dlang-community/setup-dlang@v1 with: compiler: ${{ matrix.dc }} + - name: Install Doveralls (code coverage tool) + run: dub fetch doveralls - name: DUB unit tests with coverage run: dub test --coverage From 02fe3347ebd8434ef23fea27e939bbbf87c387bc Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:12:32 +0200 Subject: [PATCH 09/23] Update d.yml --- .github/workflows/d.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index c37a97f..30a420a 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -63,11 +63,15 @@ jobs: uses: dlang-community/setup-dlang@v1 with: compiler: ${{ matrix.dc }} + - name: Install Doveralls (code coverage tool) run: dub fetch doveralls - name: DUB unit tests with coverage run: dub test --coverage + + - name: Coverage upload + run: dub run doveralls - uses: actions/upload-artifact@v3 with: From caaf5ff4c466f1657702b64fff347d8185c3a408 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:14:55 +0200 Subject: [PATCH 10/23] Update d.yml --- .github/workflows/d.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 30a420a..f0567f7 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -65,13 +65,15 @@ jobs: compiler: ${{ matrix.dc }} - name: Install Doveralls (code coverage tool) - run: dub fetch doveralls + run: | + wget -q -O - "http://bit.ly/Doveralls" | bash + chmod +x doveralls - name: DUB unit tests with coverage run: dub test --coverage - name: Coverage upload - run: dub run doveralls + run: ./doveralls - uses: actions/upload-artifact@v3 with: From d226cdf7613de2292be321d203e9c36eeca21d05 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:17:03 +0200 Subject: [PATCH 11/23] Update d.yml --- .github/workflows/d.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index f0567f7..4cbed0d 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -66,7 +66,8 @@ jobs: - name: Install Doveralls (code coverage tool) run: | - wget -q -O - "http://bit.ly/Doveralls" | bash + wget -O doveralls "https://github.com/ColdenCullen/doveralls/releases/download/v1.1.5/doveralls_linux_travis" + mv doveralls_linux_travis doveralls chmod +x doveralls - name: DUB unit tests with coverage From 3cf280d1284ca224b9b9d26dd00e42efe51866aa Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:18:19 +0200 Subject: [PATCH 12/23] Update d.yml --- .github/workflows/d.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 4cbed0d..1d87ca0 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -67,7 +67,7 @@ jobs: - name: Install Doveralls (code coverage tool) run: | wget -O doveralls "https://github.com/ColdenCullen/doveralls/releases/download/v1.1.5/doveralls_linux_travis" - mv doveralls_linux_travis doveralls + # mv doveralls_linux_travis doveralls chmod +x doveralls - name: DUB unit tests with coverage From 2417a5afe8eca424b8f1f102cdf3843248239dec Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:20:15 +0200 Subject: [PATCH 13/23] Update d.yml --- .github/workflows/d.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 1d87ca0..b49ed4e 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -66,15 +66,17 @@ jobs: - name: Install Doveralls (code coverage tool) run: | - wget -O doveralls "https://github.com/ColdenCullen/doveralls/releases/download/v1.1.5/doveralls_linux_travis" + # wget -O doveralls "https://github.com/ColdenCullen/doveralls/releases/download/v1.1.5/doveralls_linux_travis" # mv doveralls_linux_travis doveralls - chmod +x doveralls + # chmod +x doveralls + dub fetch doveralls + apt install libcurl-devel - name: DUB unit tests with coverage run: dub test --coverage - name: Coverage upload - run: ./doveralls + run: dub run doveralls - uses: actions/upload-artifact@v3 with: From 8201718774c5f2e1f23ff6695cbe003d5defbc2d Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:22:04 +0200 Subject: [PATCH 14/23] Update d.yml --- .github/workflows/d.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index b49ed4e..75cccd5 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -70,7 +70,7 @@ jobs: # mv doveralls_linux_travis doveralls # chmod +x doveralls dub fetch doveralls - apt install libcurl-devel + sudo apt install libcurl-devel - name: DUB unit tests with coverage run: dub test --coverage From 1b9b68833761c51d2bf809bb80b15945ca1a29a6 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:23:20 +0200 Subject: [PATCH 15/23] Update d.yml --- .github/workflows/d.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 75cccd5..876135f 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -70,7 +70,7 @@ jobs: # mv doveralls_linux_travis doveralls # chmod +x doveralls dub fetch doveralls - sudo apt install libcurl-devel + sudo apt install libcurl-dev - name: DUB unit tests with coverage run: dub test --coverage From a8e3dae81fafdcb52e2af62033499c2325d529e2 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:25:38 +0200 Subject: [PATCH 16/23] Update d.yml --- .github/workflows/d.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 876135f..d453327 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -70,7 +70,7 @@ jobs: # mv doveralls_linux_travis doveralls # chmod +x doveralls dub fetch doveralls - sudo apt install libcurl-dev + sudo apt install libcurl4-openssl-dev - name: DUB unit tests with coverage run: dub test --coverage From 706d5053db833dd4dd90aec3158890abbd1b80c5 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:30:20 +0200 Subject: [PATCH 17/23] Update d.yml --- .github/workflows/d.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index d453327..63554ab 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -63,6 +63,7 @@ jobs: uses: dlang-community/setup-dlang@v1 with: compiler: ${{ matrix.dc }} + repo_token: ${{COVERALLS_REPO_TOKEN}} - name: Install Doveralls (code coverage tool) run: | @@ -76,7 +77,7 @@ jobs: run: dub test --coverage - name: Coverage upload - run: dub run doveralls + run: dub run doveralls - uses: actions/upload-artifact@v3 with: From ef9a461de222d3c61d134bfe6a3b44b194a18cc7 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:33:12 +0200 Subject: [PATCH 18/23] Update d.yml --- .github/workflows/d.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 63554ab..28b5636 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -77,7 +77,7 @@ jobs: run: dub test --coverage - name: Coverage upload - run: dub run doveralls + run: dub run doveralls $COVERALLS_REPO_TOKEN - uses: actions/upload-artifact@v3 with: From e66b7750ab63fe8da1a42abd54aba5ef994bea8b Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:33:58 +0200 Subject: [PATCH 19/23] Update d.yml --- .github/workflows/d.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 28b5636..274946c 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -63,7 +63,6 @@ jobs: uses: dlang-community/setup-dlang@v1 with: compiler: ${{ matrix.dc }} - repo_token: ${{COVERALLS_REPO_TOKEN}} - name: Install Doveralls (code coverage tool) run: | From a60ce2a66fdc9104895eeffe26e80741974d280f Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:36:07 +0200 Subject: [PATCH 20/23] Update d.yml --- .github/workflows/d.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 274946c..6328c12 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -76,7 +76,7 @@ jobs: run: dub test --coverage - name: Coverage upload - run: dub run doveralls $COVERALLS_REPO_TOKEN + run: dub run doveralls -- -t $COVERALLS_REPO_TOKEN - uses: actions/upload-artifact@v3 with: From 8831ea51de5041669b0e85bb0af333c3c2087a66 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:38:19 +0200 Subject: [PATCH 21/23] Update d.yml --- .github/workflows/d.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index 6328c12..f26284b 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -76,7 +76,7 @@ jobs: run: dub test --coverage - name: Coverage upload - run: dub run doveralls -- -t $COVERALLS_REPO_TOKEN + run: dub run doveralls -- -t ${{secrets.COVERALLS_REPO_TOKEN}} - uses: actions/upload-artifact@v3 with: From f62ec5667f36c0cc4781c62d5601b7253085f850 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:41:22 +0200 Subject: [PATCH 22/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e4cf2f0..a28c63c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ tlang ===== -[![D](https://github.com/tbklang/tlang/actions/workflows/d.yml/badge.svg?branch=vardec_varass_dependency)](https://github.com/tbklang/tlang/actions/workflows/d.yml) +[![D](https://github.com/tbklang/tlang/actions/workflows/d.yml/badge.svg?branch=vardec_varass_dependency)](https://github.com/tbklang/tlang/actions/workflows/d.yml) [![Coverage Status](https://coveralls.io/repos/github/tbklang/tlang/badge.svg?branch=vardec_varass_dependency)](https://coveralls.io/github/tbklang/tlang?branch=vardec_varass_dependency) Official Tristan Language project compiler From 16caf6ebec04961c7a5bd763c3d314525c1a1108 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 21 Aug 2023 14:57:12 +0200 Subject: [PATCH 23/23] Update d.yml --- .github/workflows/d.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/d.yml b/.github/workflows/d.yml index f26284b..349dc59 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/d.yml @@ -76,7 +76,9 @@ jobs: run: dub test --coverage - name: Coverage upload - run: dub run doveralls -- -t ${{secrets.COVERALLS_REPO_TOKEN}} + run: | + export CI_BRANCH=$(git branch --show-current) + dub run doveralls -- -t ${{secrets.COVERALLS_REPO_TOKEN}} - uses: actions/upload-artifact@v3 with: