Skip to content

Commit 856bf6d

Browse files
authored
Merge pull request #94 from rejectedsoftware/dip-1000
Add DIP-1000 compatibility
2 parents 3948277 + e690f70 commit 856bf6d

File tree

5 files changed

+22
-59
lines changed

5 files changed

+22
-59
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ jobs:
3030

3131
- name: Run tests
3232
env:
33+
DC: ${{matrix.dc}}
3334
CONFIG: ${{matrix.config}}
3435
ARCH: ${{matrix.arch}}
3536
shell: bash
36-
run: |
37-
dub test
38-
dub build :makepot
37+
run: ./test.sh

.travis.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ See the preliminary [Specification](SPEC.md) for a syntax overview.
88
This repository contains the designated successor implementation of the [`vibe.templ.diet` module](https://vibed.org/api/vibe.templ.diet/) of [vibe.d](https://vibed.org/). The current state is almost stable and feature complete and ready for pre-production testing.
99

1010
[![DUB link](https://img.shields.io/dub/v/diet-ng.svg)](https://code.dlang.org/packages/diet-ng)
11-
[![Build Status](https://travis-ci.org/rejectedsoftware/diet-ng.svg?branch=master)](https://travis-ci.org/rejectedsoftware/diet-ng)
11+
[![Build Status](https://github.com/rejectedsoftware/diet-ng/actions/workflows/ci.yml/badge.svg)](https://github.com/rejectedsoftware/diet-ng/actions/workflows/ci.yml)
1212

1313

1414
Example

source/diet/dom.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ NodeContent[] toNodeContent(in AttributeContent[] contents, Location loc)
257257
return this.opEquals(other);
258258
}
259259

260-
bool opEquals(in Node other) const { return this.tupleof == other.tupleof; }
260+
bool opEquals(scope const Node other) scope const { return this.tupleof == other.tupleof; }
261261
}
262262

263263

@@ -406,7 +406,7 @@ struct NodeContent {
406406

407407
/// Compares node content for equality.
408408
bool opEquals(const scope ref NodeContent other)
409-
const {
409+
const scope {
410410
if (this.kind != other.kind) return false;
411411
if (this.loc != other.loc) return false;
412412
if (this.value != other.value) return false;

test.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
set -xe
4+
5+
DC=${DC%-*}
6+
if [ "$DC" == "ldc" ]; then DC="ldc2"; fi
7+
8+
echo "Running unit tests..."
9+
dub test
10+
11+
echo "Checing makepot for successful compilation..."
12+
dub build :makepot
13+
14+
if [ "$DC" == "ldc2" ]; then
15+
echo "Testing for DIP 1000 compatibility..."
16+
DFLAGS="--preview=dip1000 --preview=dip25" dub build
17+
fi

0 commit comments

Comments
 (0)