Skip to content

Commit a3e0d93

Browse files
author
OutBot CI
committed
fix: restructure for Mason submodule conventions and resolve warnings
- Move submodules to src/quickchpl/ per Mason package structure - Add include module statements before public use in quickchpl.chpl - Fix Property generic type warnings with Property(?) syntax - Replace _unused loop variables with bare for loops - Update test imports to use quickchpl module - Fix Mason.toml trailing newline - Update CI paths for new module structure - Bump version to 1.0.2 Resolves Mason "Main Module Check" failure and eliminates compiler warnings for generic types and unstable symbols. EOF
1 parent ba725d1 commit a3e0d93

File tree

18 files changed

+130
-75
lines changed

18 files changed

+130
-75
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Verify library compiles
3131
run: |
3232
# Verify all modules compile together
33-
chpl -M src --no-codegen src/quickchpl.chpl
33+
chpl -M src -M src/quickchpl --no-codegen src/quickchpl.chpl
3434
echo "✓ All modules compile successfully"
3535
3636
test-unit:
@@ -47,19 +47,19 @@ jobs:
4747
- name: Run Generator Tests
4848
run: |
4949
echo "Running Generator Tests..."
50-
chpl test/unit/GeneratorTests.chpl src/*.chpl -o /tmp/generator_tests
50+
chpl -M src -M src/quickchpl test/unit/GeneratorTests.chpl -o /tmp/generator_tests
5151
/tmp/generator_tests
5252
5353
- name: Run Shrinker Tests
5454
run: |
5555
echo "Running Shrinker Tests..."
56-
chpl test/unit/ShrinkerTests.chpl src/*.chpl -o /tmp/shrinker_tests
56+
chpl -M src -M src/quickchpl test/unit/ShrinkerTests.chpl -o /tmp/shrinker_tests
5757
/tmp/shrinker_tests
5858
5959
- name: Run Property Tests
6060
run: |
6161
echo "Running Property Tests..."
62-
chpl test/unit/PropertyTests.chpl src/*.chpl -o /tmp/property_tests
62+
chpl -M src -M src/quickchpl test/unit/PropertyTests.chpl -o /tmp/property_tests
6363
/tmp/property_tests
6464
6565
test-examples:
@@ -76,19 +76,19 @@ jobs:
7676
- name: Run Getting Started Example
7777
run: |
7878
echo "Running Getting Started Example..."
79-
chpl examples/GettingStarted.chpl src/*.chpl -o /tmp/getting_started
79+
chpl -M src -M src/quickchpl examples/GettingStarted.chpl -o /tmp/getting_started
8080
/tmp/getting_started
8181
8282
- name: Run Algebraic Properties Example
8383
run: |
8484
echo "Running Algebraic Properties Example..."
85-
chpl examples/AlgebraicProperties.chpl src/*.chpl -o /tmp/algebraic
85+
chpl -M src -M src/quickchpl examples/AlgebraicProperties.chpl -o /tmp/algebraic
8686
/tmp/algebraic
8787
8888
- name: Run Custom Generators Example
8989
run: |
9090
echo "Running Custom Generators Example..."
91-
chpl examples/CustomGenerators.chpl src/*.chpl -o /tmp/custom_gen
91+
chpl -M src -M src/quickchpl examples/CustomGenerators.chpl -o /tmp/custom_gen
9292
/tmp/custom_gen
9393
9494
test-self:
@@ -104,7 +104,7 @@ jobs:
104104

105105
- name: Run quickchpl self-tests
106106
run: |
107-
chpl test/properties/SelfTests.chpl src/*.chpl -o /tmp/self_tests
107+
chpl -M src -M src/quickchpl test/properties/SelfTests.chpl -o /tmp/self_tests
108108
/tmp/self_tests --numTests=${{ env.QUICKCHPL_NUM_TESTS }}
109109
110110
test-matrix:
@@ -124,7 +124,7 @@ jobs:
124124
- name: Build with Chapel ${{ matrix.chapel-version }}
125125
run: |
126126
chpl --version
127-
chpl test/unit/GeneratorTests.chpl src/*.chpl -o /tmp/test
127+
chpl -M src -M src/quickchpl test/unit/GeneratorTests.chpl -o /tmp/test
128128
/tmp/test
129129
130130
lint:
@@ -140,7 +140,7 @@ jobs:
140140
run: |
141141
echo "Running chplcheck linter..."
142142
chplcheck --version || echo "chplcheck version unknown"
143-
chplcheck src/*.chpl test/*.chpl examples/*.chpl > chplcheck.log 2>&1 || true
143+
chplcheck src/*.chpl src/quickchpl/*.chpl test/*.chpl test/**/*.chpl examples/*.chpl > chplcheck.log 2>&1 || true
144144
cat chplcheck.log
145145
146146
# Count violations (excluding intentional API design decisions)
@@ -152,9 +152,8 @@ jobs:
152152
153153
# Known acceptable violations:
154154
# - 8 CamelCaseRecords (generator types - intentional API)
155-
# - 21 UnusedLoopIndex (_unused variable - Chapel limitation)
156155
# - 1 PascalCaseModules (quickchpl - package name)
157-
ACCEPTABLE=30
156+
ACCEPTABLE=9
158157
159158
if [ "$VIOLATIONS" -gt "$ACCEPTABLE" ]; then
160159
echo "❌ Too many chplcheck violations (expected <=$ACCEPTABLE, got $VIOLATIONS)"
@@ -166,7 +165,7 @@ jobs:
166165
- name: Check for trailing whitespace
167166
run: |
168167
echo "Checking for trailing whitespace..."
169-
! grep -rn '[[:space:]]$' src/*.chpl test/*.chpl examples/*.chpl || {
168+
! grep -rn '[[:space:]]$' src/*.chpl src/quickchpl/*.chpl test/*.chpl test/**/*.chpl examples/*.chpl || {
170169
echo "Found trailing whitespace"
171170
exit 1
172171
}
@@ -190,10 +189,9 @@ jobs:
190189

191190
- name: Generate documentation with chpldoc
192191
run: |
193-
cd src
194-
for file in *.chpl; do
192+
for file in src/quickchpl.chpl src/quickchpl/*.chpl; do
195193
echo "Generating docs for $file..."
196-
chpldoc "$file" --output-dir ../docs/api || echo "Warning: chpldoc failed for $file"
194+
chpldoc "$file" --output-dir docs/api || echo "Warning: chpldoc failed for $file"
197195
done
198196
199197
- name: Upload documentation artifacts

.gitlab-ci.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ build:
2929
script:
3030
- chpl --version
3131
# Verify all modules compile together
32-
- chpl -M src --no-codegen src/quickchpl.chpl
32+
- chpl -M src -M src/quickchpl --no-codegen src/quickchpl.chpl
3333
- echo "✓ All modules compile successfully"
3434

3535
# ============================================
@@ -41,7 +41,7 @@ lint:chplcheck:
4141
script:
4242
- echo "Running chplcheck linter..."
4343
- chplcheck --version || echo "chplcheck version unknown"
44-
- chplcheck src/*.chpl test/*.chpl examples/*.chpl > chplcheck.log 2>&1 || true
44+
- chplcheck src/*.chpl src/quickchpl/*.chpl test/*.chpl test/**/*.chpl examples/*.chpl > chplcheck.log 2>&1 || true
4545
- cat chplcheck.log
4646
- |
4747
# Count violations (excluding intentional API design decisions)
@@ -53,9 +53,8 @@ lint:chplcheck:
5353
5454
# Known acceptable violations:
5555
# - 8 CamelCaseRecords (generator types - intentional API)
56-
# - 21 UnusedLoopIndex (_unused variable - Chapel limitation)
5756
# - 1 PascalCaseModules (quickchpl - package name)
58-
ACCEPTABLE=30
57+
ACCEPTABLE=9
5958
6059
if [ "$VIOLATIONS" -gt "$ACCEPTABLE" ]; then
6160
echo "❌ Too many chplcheck violations (expected <=$ACCEPTABLE, got $VIOLATIONS)"
@@ -74,7 +73,7 @@ lint:whitespace:
7473
script:
7574
- echo "Checking for trailing whitespace..."
7675
- |
77-
! grep -rn '[[:space:]]$' src/*.chpl test/*.chpl examples/*.chpl || {
76+
! grep -rn '[[:space:]]$' src/*.chpl src/quickchpl/*.chpl test/*.chpl test/**/*.chpl examples/*.chpl || {
7877
echo "Found trailing whitespace"
7978
exit 1
8079
}
@@ -97,49 +96,49 @@ test:unit:generators:
9796
stage: test
9897
script:
9998
- echo "Running Generator Tests..."
100-
- chpl test/unit/GeneratorTests.chpl src/*.chpl -o /tmp/generator_tests
99+
- chpl -M src -M src/quickchpl test/unit/GeneratorTests.chpl -o /tmp/generator_tests
101100
- /tmp/generator_tests
102101

103102
test:unit:shrinkers:
104103
stage: test
105104
script:
106105
- echo "Running Shrinker Tests..."
107-
- chpl test/unit/ShrinkerTests.chpl src/*.chpl -o /tmp/shrinker_tests
106+
- chpl -M src -M src/quickchpl test/unit/ShrinkerTests.chpl -o /tmp/shrinker_tests
108107
- /tmp/shrinker_tests
109108

110109
test:unit:properties:
111110
stage: test
112111
script:
113112
- echo "Running Property Tests..."
114-
- chpl test/unit/PropertyTests.chpl src/*.chpl -o /tmp/property_tests
113+
- chpl -M src -M src/quickchpl test/unit/PropertyTests.chpl -o /tmp/property_tests
115114
- /tmp/property_tests
116115

117116
test:examples:
118117
stage: test
119118
script:
120119
- echo "Running Getting Started Example..."
121-
- chpl examples/GettingStarted.chpl src/*.chpl -o /tmp/getting_started
120+
- chpl -M src -M src/quickchpl examples/GettingStarted.chpl -o /tmp/getting_started
122121
- /tmp/getting_started
123122
- echo "Running Algebraic Properties Example..."
124-
- chpl examples/AlgebraicProperties.chpl src/*.chpl -o /tmp/algebraic
123+
- chpl -M src -M src/quickchpl examples/AlgebraicProperties.chpl -o /tmp/algebraic
125124
- /tmp/algebraic
126125
- echo "Running Custom Generators Example..."
127-
- chpl examples/CustomGenerators.chpl src/*.chpl -o /tmp/custom_gen
126+
- chpl -M src -M src/quickchpl examples/CustomGenerators.chpl -o /tmp/custom_gen
128127
- /tmp/custom_gen
129128

130129
test:self:
131130
stage: test
132131
script:
133132
- echo "Running quickchpl self-tests..."
134-
- chpl test/properties/SelfTests.chpl src/*.chpl -o /tmp/self_tests
133+
- chpl -M src -M src/quickchpl test/properties/SelfTests.chpl -o /tmp/self_tests
135134
- /tmp/self_tests --numTests=$QUICKCHPL_NUM_TESTS
136135

137136
# Matrix testing for Chapel versions
138137
.test:matrix:
139138
stage: test
140139
script:
141140
- chpl --version
142-
- chpl test/unit/GeneratorTests.chpl src/*.chpl -o /tmp/test
141+
- chpl -M src -M src/quickchpl test/unit/GeneratorTests.chpl -o /tmp/test
143142
- /tmp/test
144143

145144
test:chapel-2.6.0:
@@ -158,10 +157,10 @@ docs:chpldoc:
158157
stage: docs
159158
script:
160159
- mkdir -p docs/api
161-
- cd src
162-
- for file in *.chpl; do
160+
- |
161+
for file in src/quickchpl.chpl src/quickchpl/*.chpl; do
163162
echo "Generating docs for $file...";
164-
chpldoc "$file" --output-dir ../docs/api || echo "Warning: chpldoc failed for $file";
163+
chpldoc "$file" --output-dir docs/api || echo "Warning: chpldoc failed for $file";
165164
done
166165
artifacts:
167166
paths:

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,43 @@ All notable changes to quickchpl will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/),
66
and this project adheres to [Semantic Versioning](https://semver.org/).
77

8+
## [1.0.2] - 2026-01-15
9+
10+
### Fixed
11+
- Generic type warnings: Added `Property(?)` syntax for generic formal parameters
12+
- Unstable symbol warnings: Replaced `_unused` loop variables with bare `for 1..n` syntax
13+
- Mason main module check: Restructured to proper submodule convention
14+
15+
### Changed
16+
- Moved submodules to `src/quickchpl/` directory per Mason package conventions
17+
- Updated `quickchpl.chpl` to use `include module` statements before `public use`
18+
- Test files now import via `use quickchpl` instead of direct submodule imports
19+
- CI acceptable violations reduced from 30 to 9 (removed UnusedLoopIndex)
20+
- Chapel version compatibility extended to 2.8.0
21+
22+
### Infrastructure
23+
- Updated GitHub Actions and GitLab CI paths for new module structure
24+
- Fixed Mason.toml trailing newline (Mason bug workaround)
25+
26+
[1.0.2]: https://github.com/Jesssullivan/quickchpl/releases/tag/v1.0.2
27+
28+
## [1.0.1] - 2026-01-12
29+
30+
### Fixed
31+
- README examples updated to match actual API signatures
32+
- Tuple destructuring syntax corrected for Chapel 2.6+
33+
- Removed references to non-existent Pattern template functions
34+
35+
### Changed
36+
- Consolidated `tests/` directory to `test/` (Mason convention)
37+
- Added chplcheck linting integration to CI
38+
39+
### Infrastructure
40+
- Added GitLab CI/CD configuration
41+
- Fixed release workflow permissions and URLs
42+
43+
[1.0.1]: https://github.com/Jesssullivan/quickchpl/releases/tag/v1.0.1
44+
845
## [1.0.0] - 2026-01-12
946

1047
### Added

Mason.lock

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
[root]
3+
authors = ["Jess Sullivan <jess@sulliwood.org>"]
4+
chplVersion = "2.7.0..2.7.0"
5+
description = "A simple property-based testing library for Chapel"
6+
keywords = ["testing", "property-based", "quickcheck", "pbt", "fuzzing"]
7+
license = "MIT"
8+
name = "quickchpl"
9+
repository = "https://github.com/Jesssullivan/quickchpl"
10+
source = "https://github.com/Jesssullivan/quickchpl"
11+
type = "library"
12+
version = "1.0.2"
13+
14+

Mason.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[brick]
22
name = "quickchpl"
3-
version = "1.0.1"
3+
version = "1.0.2"
44
type = "library"
55
chplVersion = "2.6.0..2.8.0"
66
license = "MIT"
@@ -15,4 +15,4 @@ keywords = ["testing", "property-based", "quickcheck", "pbt", "fuzzing"]
1515

1616
[dev-dependencies]
1717
# chplcheck is required for linting (installed with Chapel)
18-
# Run with: chplcheck src/*.chpl test/*.chpl examples/*.chpl
18+
# Run with: chplcheck src/*.chpl test/*.chpl examples/*.chpl

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,17 @@ var result = runner.check(prop);
321321

322322

323323

324+
324325
### Todos & Future work:
325326
- [x] Integrate with Chapel Mason package repo (in progress)
326327
- [ ] Integrate Outbot Harness
327328
- [x] Integrate with (and `[ ]` publish) sister projects, `chapel-k8s-mail`, `chapel-git`, `tinymachines`, `mariolex`)
328-
- [x] Add IDE and LLM friendly text and code completions (docs in the works)
329+
- [ ] Add IDE and LLM friendly text and code completions (docs in the works)
329330
- [x] Provide public demo (`aoc-2025` **done! one is good for now**)
330331

332+
---
331333

334+
### Notes:
335+
- `module include statements are not yet stable` <-- this is expected
336+
- `list.parSafe is unstable` <-- this is expected
337+
- `use of routines as values is unstable` <-- routines are necessary AFAICT to achieve this familiar PBT structure

examples/CustomGenerators.chpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ module CustomGenerators {
101101
}
102102

103103
iter these(n: int = 100) ref : Color {
104-
for _unused in 1..n {
104+
for 1..n {
105105
yield this.next();
106106
}
107107
}
@@ -212,7 +212,7 @@ module CustomGenerators {
212212
// Show distribution (not a property test, just informative)
213213
writeln("\n Color distribution (100 samples):");
214214
var counts: [0..7] int;
215-
for _unused in 1..100 {
215+
for 1..100 {
216216
const c = gen.next();
217217
select c {
218218
when Color.Red do counts[0] += 1;

src/quickchpl.chpl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,19 @@ module quickchpl {
7575
/* Random seed (-1 for random, or positive int for reproducibility). */
7676
config const seed = -1;
7777

78-
// Public API: Re-export core modules
78+
// Public API: Include and re-export core modules
79+
include module Generators;
7980
public use Generators;
81+
include module Properties;
8082
public use Properties;
83+
include module Shrinkers;
8184
public use Shrinkers;
85+
include module Reporters;
8286
public use Reporters;
83-
public use Patterns;
87+
include module Combinators;
8488
public use Combinators;
89+
include module Patterns;
90+
public use Patterns;
8591

8692
/*
8793
Version Information
@@ -91,7 +97,7 @@ module quickchpl {
9197
*/
9298

9399
/* Full semantic version string. */
94-
param VERSION = "1.0.1";
100+
param VERSION = "1.0.2";
95101

96102
/* Major version number. */
97103
param VERSION_MAJOR = 1;
@@ -100,7 +106,7 @@ module quickchpl {
100106
param VERSION_MINOR = 0;
101107

102108
/* Patch version number. */
103-
param VERSION_PATCH = 1;
109+
param VERSION_PATCH = 2;
104110

105111
/*
106112
Quick property check with default configuration.

0 commit comments

Comments
 (0)