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

Update dependencies and fix compiler errors with recent DMD (v2.109.9) #11

Merged
merged 8 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
15 changes: 8 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-24.04
aminya marked this conversation as resolved.
Show resolved Hide resolved
- windows-2022
- macos-11.0
- macos-13.0
aminya marked this conversation as resolved.
Show resolved Hide resolved
d:
- "ldc-1.28.1"
- "dmd-2.098.1"
- "ldc-1.38.0"
- "dmd-2.109.1"
clang:
- 13.0.0
# default setup-cpp version
- true
cmake:
- 3.22.2
- 3.28.3
ninja:
- 1.10.2
- 1.11.1
exclude:
# TODO ci job fails with object.Error@(0): Access Violation error
- os: windows-2022
Expand Down
7 changes: 1 addition & 6 deletions dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,10 @@ sourceFiles "./src/d_tree_sitter/libc.d" // gen by dpp
extraDependencyFiles "./src/tree-sitter-version.txt" "./package.json" "./src/meson.build"

lflags "$PACKAGE_DIR/src/d_tree_sitter/build/libtree_sitter.a"
dependency "bc-string" version="1.2.2"
dependency "bc-string" version="1.4.0"

// -------- Build Options and configurations --------

// enables most of the dips
dflags "-preview=dip25" "-preview=dip1000" "-preview=dip1008" "-preview=fieldwise" "-preview=fixAliasThis" "-preview=intpromote" "-preview=rvaluerefparam" "-preview=in"
/* dflags "-preview=dip1021" */ // causes random crashes
/* dflags "-preview=inclusiveincontracts" platform="dmd" // only on dmd */

buildType "release" {
dflags "-vgc" "--flto=full" "--ffast-math" "--linkonce-templates" platform="ldc"
buildOptions "releaseMode" "optimize" "inline"
Expand Down
2 changes: 1 addition & 1 deletion dub.selections.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"fileVersion": 1,
"versions": {
"bc-string": "1.2.2"
"bc-string": "1.4.0"
}
}
3 changes: 3 additions & 0 deletions src/d_tree_sitter/libc.dpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module libc;

import core.stdc.stdint;


#include "./gen/tree-sitter/lib/include/tree_sitter/api.h"
2 changes: 1 addition & 1 deletion src/d_tree_sitter/node.d
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ struct Node
A node. If the given node doesn't have a parent, it returns the node itself.
Note: the nth might not be reached if there are no more parents.
*/
auto nth_parent(in uint max_nth = 2) @nogc nothrow @trusted const
auto nth_parent(uint max_nth = 2) @nogc nothrow @trusted const
{
auto maybeFirstParent = this.parent();
if (maybeFirstParent.isNull())
Expand Down
6 changes: 3 additions & 3 deletions src/d_tree_sitter/parser.d
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct Parser
Params:
language = the language you want to create a parser for
*/
this(in Language language) nothrow @nogc
this(Language language) nothrow @nogc
{
// Create a parser.
this.tsparser = ts_parser_new();
Expand All @@ -54,7 +54,7 @@ struct Parser
* NOTE it assumes that the language is compatible. Returns a boolean indicating whether or not the language was successfully
* assigned.
*/
auto set_language_nothrow(in Language language) nothrow
auto set_language_nothrow(Language language) nothrow
{
return ts_parser_set_language(tsparser, language.tslanguage);
}
Expand All @@ -69,7 +69,7 @@ struct Parser
* and compare it to this library's `TREE_SITTER_LANGUAGE_VERSION` and
* `TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION` constants.
*/
auto set_language(in Language language)
auto set_language(Language language)
{
// TODO make set_language private?
enforce_compatible_language(language);
Expand Down
Loading