From 54b8e7ccfa0757a1d7acbed6acf178ba9f041ea8 Mon Sep 17 00:00:00 2001 From: mjovanc Date: Fri, 24 Nov 2023 13:34:44 +0100 Subject: [PATCH 1/6] Adding simple github workflow ci.yml --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f7cea86 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: build + +on: + push: + pull_request: + +jobs: + build: + name: "Build: ${{ matrix.config.name }} / ${{ matrix.config.platform }}" + runs-on: ${{ matrix.config.os }} + + strategy: + fail-fast: true + matrix: + config: + - { name: "Windows Latest", os: windows-latest, platform: x64 } + - { name: "Ubuntu Latest", os: ubuntu-latest, platform: x64 } + - { name: "macOS 11", os: macos-11, platform: x64 } + - { name: "macOS Latest", os: macos-latest, platform: arm64 } + + steps: + - uses: actions/checkout@v3 + - name: Set up OpenJDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: 'gradle' + + - name: Assemble + run: mvn install + + unit-test: + name: Unit Test + runs-on: ubuntu-latest + needs: [ build ] + + steps: + - uses: actions/checkout@v3 + + - name: Set up OpenJDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: 'gradle' + + - name: Run Unit Test + run: mvn test From 9ba54350120881e1ec6e9f5f3a73d55d16e0bdec Mon Sep 17 00:00:00 2001 From: mjovanc Date: Fri, 24 Nov 2023 13:35:01 +0100 Subject: [PATCH 2/6] Adding junit5 dependency --- pom.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pom.xml b/pom.xml index 1080d0f..ebb1154 100644 --- a/pom.xml +++ b/pom.xml @@ -128,6 +128,13 @@ log4j-core 2.20.0 + + + org.junit.jupiter + junit-jupiter-engine + 5.10.1 + test + From d6b6fa0314af559bc3225afeee639c5c25ee516c Mon Sep 17 00:00:00 2001 From: mjovanc Date: Fri, 24 Nov 2023 13:35:19 +0100 Subject: [PATCH 3/6] Adding test dir and adding ParserTest --- src/test/java/me/anthonyw/darkmatter/ParserTest.java | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/test/java/me/anthonyw/darkmatter/ParserTest.java diff --git a/src/test/java/me/anthonyw/darkmatter/ParserTest.java b/src/test/java/me/anthonyw/darkmatter/ParserTest.java new file mode 100644 index 0000000..2ff07d6 --- /dev/null +++ b/src/test/java/me/anthonyw/darkmatter/ParserTest.java @@ -0,0 +1,7 @@ +package me.anthonyw.darkmatter; + +import static org.junit.jupiter.api.Assertions.*; + +class ParserTest { + +} From cff1a1da0e06cebe9873dba01ea8b5f2f4bfe18a Mon Sep 17 00:00:00 2001 From: mjovanc Date: Fri, 24 Nov 2023 13:39:24 +0100 Subject: [PATCH 4/6] Adding issue templates --- .github/ISSUE_TEMPLATE/config.yml | 5 +++++ .github/ISSUE_TEMPLATE/issue_bug.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/issue_bug.md diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..4cdb9c3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Darkmatter X Community + url: https://twitter.com/i/communities/1727990925480079392 + about: Please ask and answer usage-related questions here. diff --git a/.github/ISSUE_TEMPLATE/issue_bug.md b/.github/ISSUE_TEMPLATE/issue_bug.md new file mode 100644 index 0000000..3137a9d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue_bug.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: Our code behaves incorrectly? +title: '' +labels: bug +assignees: '' + +--- + + + +**Describe the bug** + +What happened? What should have happened instead? + +**Provide a Reproducer** + +* If possible, please provide a small self-contained project (or even just a single file) where the issue reproduces. +* If you can't pinpoint the issue, please provide at least *some* project where this reproduces, for example, your production one. If you are not ready to show the project publicly, we are open to discussing the details privately. +* If you really can't provide any code, please do still open an issue. This may prompt other people to chime in with their reproducers. From 5a793225ca5007f71330dd358d60b2de073cdccb Mon Sep 17 00:00:00 2001 From: mjovanc Date: Fri, 24 Nov 2023 13:43:31 +0100 Subject: [PATCH 5/6] Updating ci.yml with caching of maven dependencies --- .github/workflows/ci.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7cea86..1d564f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,8 @@ name: build on: push: + branches: + - master pull_request: jobs: @@ -25,7 +27,15 @@ jobs: with: java-version: '17' distribution: 'temurin' - cache: 'gradle' + + - name: Cache Maven dependencies + uses: actions/cache@v2 + with: + path: | + ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/*.xml') }} + restore-keys: | + ${{ runner.os }}-maven- - name: Assemble run: mvn install @@ -43,7 +53,15 @@ jobs: with: java-version: '17' distribution: 'temurin' - cache: 'gradle' + + - name: Cache Maven dependencies + uses: actions/cache@v2 + with: + path: | + ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/*.xml') }} + restore-keys: | + ${{ runner.os }}-maven- - name: Run Unit Test run: mvn test From 79f1f5de44039d6d32d46c204f9c9975baf0566f Mon Sep 17 00:00:00 2001 From: mjovanc Date: Fri, 24 Nov 2023 14:03:12 +0100 Subject: [PATCH 6/6] Updating README --- README.md | 65 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 6225296..2a17571 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![build](https://img.shields.io/github/actions/workflow/status/darkmatter-lang/darkmatter/ci.yml?branch=master)](https://github.com/darkmatter-lang/darkmatter/actions/workflows/ci.yml) +[![license](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) + # Darkmatter A programming language from another universe. @@ -6,8 +9,6 @@ This is the official darkmatter compiler/linker, it outputs LLVM IR (IL-ASM) and Darkmatter language adopts a flat-style texture of a blackhole as its official logo and adopts the color `#00FFFF` (cyan) as its "language color." - - I wanted to write a language that was just that, a language. Some languages these days claim to be "more efficient" by abreviating things, however, I find that to make the code confusing and messy. @@ -16,12 +17,9 @@ As even Rust-lang states, most time is spent reading code and refactoring it rat So the intent with this language is to be readable and easy to understand. - - - The darkmatter compiler also has a `-I` immediate-interpretation mode which will evaluate the code within the JVM. -### Roadmap +## Roadmap Syntax - [ ] Unsigned primitives @@ -57,25 +55,21 @@ Package Manager (`tesseract`) - [ ] Read `project.toml` -### Specification +## Specification - Directly compiled language, no JIT. - Can output a static/shared library (.so/.dll/.dylib) or executable (ELF/PE/MACH-O). - Similar to Java/C# syntax. - RAII (no Garbage Collector)? - - -#### In the darkmatter language, all variables are: +### In the darkmatter language, all variables are: - Statically typed. - Immutable by default. +## Logging - -### Logging - -#### Logging Levels +### Logging Levels The default logging levels are as follows: - `TRACE` Most verbose, all debug messages will be shown including internal process states. @@ -84,16 +78,51 @@ The default logging levels are as follows: - `WARN` Only warning messages will be shown along with errors. - `ERROR` Strictly only error messages will be shown. - -#### Console Logging +### Console Logging Console logging is always enabled but can be limited to only showing certain messages tagged with specific severities such as `WARN` OR `ERROR`. This is by-design. - -#### File Logging +### File Logging File logging can be enabled by either passing in a valid file path as to where logs will be stored, by setting the environment variable `LOG_FILE` to a valid path, or by configuring this via the Java API. +## Getting Help + +Are you having trouble with Darkmatter? We want to help! + +- If you are upgrading, read the release notes for upgrade instructions and "new and noteworthy" features. + +- Ask a question we monitor stackoverflow.com for questions tagged with darkmatter. You can also talk with the community on X. + +- Report bugs with Darkmatter at [https://github.com/darkmatter-lang/darkmatter/issues](https://github.com/darkmatter-lang/darkmatter/issues). + +- Join the Discussion on X and be part of the community [https://twitter.com/i/communities/1727990925480079392](https://twitter.com/i/communities/1727990925480079392) + +## Reporting Issues + +Darkmatter uses GitHub’s integrated issue tracking system to record bugs and feature requests. If you want to raise an issue, please follow the recommendations below: + +- Before you log a bug, please search the issue tracker to see if someone has already reported the problem. + +- If the issue doesn’t already exist, create a new issue. + +- Please provide as much information as possible with the issue report. We like to know the Darkmatter version, operating system etc you’re using. + +- If you need to paste code or include a stack trace, use Markdown. ``` escapes before and after your text. + +- If possible, try to create a test case or project that replicates the problem and attach it to the issue. + +## Contributors + +The following contributors have either helped to start this project, have contributed +code, are actively maintaining it (including documentation), or in other ways +being awesome contributors to this project. **We'd like to take a moment to recognize them.** + +[anthonywww](https://github.com/anthonywww) +[mjovanc](https://github.com/mjovanc) + +## License +The MIT License.