Skip to content

Commit 95515da

Browse files
Bump compact 0.25.0 (#233)
Signed-off-by: Andrew Fleming <[email protected]> Co-authored-by: 0xisk <[email protected]>
1 parent ccd09b8 commit 95515da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+139
-123
lines changed

.devcontainer/Dockerfile

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,23 @@ FROM mcr.microsoft.com/devcontainers/javascript-node
33

44
# Midnight binaries and tools download URLs
55
# Source: https://docs.midnight.network/relnotes/overview
6-
ARG COMPACTC_URL="https://d3fazakqrumx6p.cloudfront.net/artifacts/compiler/compactc_0.24.0/compactc_v0.24.0_x86_64-unknown-linux-musl.zip"
7-
ARG COMPACT_VSCODE_URL="https://raw.githubusercontent.com/midnight-ntwrk/releases/gh-pages/artifacts/vscode-extension/compact-0.2.13/compact-0.2.13.vsix"
6+
ARG COMPACT_TOOLCHAIN_VERSION=0.25.0
7+
ARG COMPACT_VSCODE_VERSION=0.2.13
8+
ARG COMPACT_VSCODE_URL="https://raw.githubusercontent.com/midnight-ntwrk/releases/gh-pages/artifacts/vscode-extension/compact-${COMPACT_VSCODE_VERSION}/compact-${COMPACT_VSCODE_VERSION}.vsix"
89

9-
# Download the compact VS Code extension (later installed via devcontainer.json)
10-
RUN wget -O /tmp/compact.vsix $COMPACT_VSCODE_URL
10+
# Install required dependencies and clean up
11+
RUN apt-get update \
12+
&& apt-get install -y curl unzip wget \
13+
&& rm -rf /var/lib/apt/lists/*
1114

12-
# Install the Compact compiler (compactc)
13-
RUN wget -O /tmp/compactc.zip $COMPACTC_URL \
14-
&& unzip /tmp/compactc.zip -d /tmp/compactc \
15-
&& sudo mv /tmp/compactc/* /usr/local/bin/
15+
# Download the Compact VS Code extension (used by devcontainer.json)
16+
RUN wget -O /tmp/compact.vsix "${COMPACT_VSCODE_URL}"
17+
18+
# Install Compact developer tools CLI
19+
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/midnightntwrk/compact/releases/download/compact-v0.2.0/compact-installer.sh | sh
20+
21+
# Add Compact CLI to the PATH
22+
ENV PATH="/root/.compact/bin:$PATH"
1623

1724
# Install turbo for monorepo management
18-
RUN npm install turbo --global
25+
RUN npm install --location=global turbo

.devcontainer/devcontainer.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,5 @@
33
"build": {
44
"dockerfile": "Dockerfile"
55
},
6-
"customizations": {
7-
"vscode": {
8-
"extensions": ["/tmp/compact.vsix"]
9-
}
10-
}
6+
"postCreateCommand": "code --install-extension /tmp/compact.vsix && compact update 0.25.0"
117
}

.github/ISSUE_TEMPLATE/01_bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ body:
9393
label: Version
9494
description: What version of Compact are you running?
9595
options:
96-
- 0.24.0 (Default)
96+
- 0.25.0 (Default)
9797
default: 0
9898
validations:
9999
required: true

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88

99
env:
1010
TURBO_TELEMETRY_DISABLED: 1
11-
COMPILER_VERSION: "0.24.0"
12-
LANGUAGE_VERSION: "0.16.0"
11+
COMPILER_VERSION: "0.25.0"
12+
LANGUAGE_VERSION: "0.17.0"
1313

1414
jobs:
1515
run-suite:

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Changed
11+
12+
- Bump compact compiler to v0.25.0 (#233)

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ Please follow these steps to have your contribution considered by the maintainer
144144
3. Follow all instructions in [the template](.github/PULL_REQUEST_TEMPLATE.md)
145145
4. Follow the [engineering guidelines](./GUIDELINES.md).
146146
5. Follow the [styleguides](#styleguides)
147-
6. After you submit your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing. <details><summary>What if the status checks are failing?</summary>
147+
6. If the PR includes non-trivial changes, additions, or deletions (especially in Compact modules and/or witnesses),
148+
add an entry to the [CHANGELOG](./CHANGELOG.md).
149+
7. After you submit your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing. <details><summary>What if the status checks are failing?</summary>
148150
If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated.
149151
A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.</details>
150152

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Generic badge](https://img.shields.io/badge/Compact%20Compiler-0.24.0-1abc9c.svg)](https://docs.midnight.network/relnotes/compact)
1+
[![Generic badge](https://img.shields.io/badge/Compact%20Compiler-0.25.0-1abc9c.svg)](https://docs.midnight.network/relnotes/compact)
22
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
33

44
# OpenZeppelin Contracts for Compact
@@ -20,8 +20,8 @@ Follow Midnight's [Compact Developer Tools installation guide](https://docs.midn
2020
```bash
2121
$ compact compile --version
2222

23-
Compactc version: 0.24.0
24-
0.24.0
23+
Compactc version: 0.25.0
24+
0.25.0
2525
```
2626

2727
### Installation
@@ -59,7 +59,7 @@ Import modules through `node_modules` rather than directly to avoid state confli
5959
```typescript
6060
// MyContract.compact
6161

62-
pragma language_version >= 0.16.0;
62+
pragma language_version >= 0.17.0;
6363

6464
import CompactStandardLibrary;
6565
import "./compact-contracts/node_modules/@openzeppelin-compact/contracts/src/access/Ownable"

compact/src/Builder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ const execAsync = promisify(exec);
2929
* ```
3030
* ℹ [COMPILE] Found 2 .compact file(s) to compile
3131
* ✔ [COMPILE] [1/2] Compiled AccessControl.compact
32-
* Compactc version: 0.24.0
32+
* Compactc version: 0.25.0
3333
* ✔ [COMPILE] [2/2] Compiled MockAccessControl.compact
34-
* Compactc version: 0.24.0
34+
* Compactc version: 0.25.0
3535
* ✔ [BUILD] [1/3] Compiling TypeScript
3636
* ✔ [BUILD] [2/3] Copying artifacts
3737
* ✔ [BUILD] [3/3] Copying and cleaning .compact files
@@ -41,7 +41,7 @@ const execAsync = promisify(exec);
4141
* ```
4242
* ℹ [COMPILE] Found 2 .compact file(s) to compile
4343
* ✖ [COMPILE] [1/2] Failed AccessControl.compact
44-
* Compactc version: 0.24.0
44+
* Compactc version: 0.25.0
4545
* Error: Expected ';' at line 5 in AccessControl.compact
4646
* ```
4747
*

compact/src/Compiler.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export type ExecFunction = (
3939
* @example
4040
* ```typescript
4141
* const validator = new EnvironmentValidator();
42-
* await validator.validate('0.24.0');
42+
* await validator.validate('0.25.0');
4343
* const version = await validator.getDevToolsVersion();
4444
* ```
4545
*/
@@ -100,7 +100,7 @@ export class EnvironmentValidator {
100100
* @throws {Error} If the CLI is not available or command fails
101101
* @example
102102
* ```typescript
103-
* const toolchainVersion = await validator.getToolchainVersion('0.24.0');
103+
* const toolchainVersion = await validator.getToolchainVersion('0.25.0');
104104
* console.log(`Toolchain: ${toolchainVersion}`);
105105
* ```
106106
*/
@@ -122,7 +122,7 @@ export class EnvironmentValidator {
122122
* @example
123123
* ```typescript
124124
* try {
125-
* await validator.validate('0.24.0');
125+
* await validator.validate('0.25.0');
126126
* console.log('Environment validated successfully');
127127
* } catch (error) {
128128
* if (error instanceof CompactCliNotFoundError) {
@@ -215,7 +215,7 @@ export class FileDiscovery {
215215
* const result = await compiler.compileFile(
216216
* 'contracts/Token.compact',
217217
* '--skip-zk --verbose',
218-
* '0.24.0'
218+
* '0.25.0'
219219
* );
220220
* console.log('Compilation output:', result.stdout);
221221
* ```
@@ -247,7 +247,7 @@ export class CompilerService {
247247
* const result = await compiler.compileFile(
248248
* 'security/AccessControl.compact',
249249
* '--skip-zk',
250-
* '0.24.0'
250+
* '0.25.0'
251251
* );
252252
* console.log('Success:', result.stdout);
253253
* } catch (error) {
@@ -296,7 +296,7 @@ export class CompilerService {
296296
* @class UIService
297297
* @example
298298
* ```typescript
299-
* UIService.displayEnvInfo('compact 0.1.0', 'Compactc 0.24.0', 'security');
299+
* UIService.displayEnvInfo('compact 0.1.0', 'Compactc 0.25.0', 'security');
300300
* UIService.printOutput('Compilation successful', chalk.green);
301301
* ```
302302
*/
@@ -333,9 +333,9 @@ export const UIService = {
333333
* ```typescript
334334
* UIService.displayEnvInfo(
335335
* 'compact 0.1.0',
336-
* 'Compactc version: 0.24.0',
336+
* 'Compactc version: 0.25.0',
337337
* 'security',
338-
* '0.24.0'
338+
* '0.25.0'
339339
* );
340340
* ```
341341
*/
@@ -419,7 +419,7 @@ export const UIService = {
419419
* @example
420420
* ```typescript
421421
* // Basic usage
422-
* const compiler = new CompactCompiler('--skip-zk', 'security', '0.24.0');
422+
* const compiler = new CompactCompiler('--skip-zk', 'security', '0.25.0');
423423
* await compiler.compile();
424424
*
425425
* // Factory method usage
@@ -452,7 +452,7 @@ export class CompactCompiler {
452452
*
453453
* @param flags - Space-separated compiler flags (e.g., '--skip-zk --verbose')
454454
* @param targetDir - Optional subdirectory within src/ to compile (e.g., 'security', 'token')
455-
* @param version - Optional toolchain version to use (e.g., '0.24.0')
455+
* @param version - Optional toolchain version to use (e.g., '0.25.0')
456456
* @param execFn - Optional custom exec function for dependency injection
457457
* @example
458458
* ```typescript
@@ -463,7 +463,7 @@ export class CompactCompiler {
463463
* const compiler = new CompactCompiler('', 'security');
464464
*
465465
* // Compile with specific version
466-
* const compiler = new CompactCompiler('--skip-zk', undefined, '0.24.0');
466+
* const compiler = new CompactCompiler('--skip-zk', undefined, '0.25.0');
467467
*
468468
* // For testing with custom exec function
469469
* const mockExec = vi.fn();
@@ -500,11 +500,11 @@ export class CompactCompiler {
500500
* @throws {Error} If --dir flag is provided without a directory name
501501
* @example
502502
* ```typescript
503-
* // Parse command line: compact-compiler --dir security --skip-zk +0.24.0
503+
* // Parse command line: compact-compiler --dir security --skip-zk +0.25.0
504504
* const compiler = CompactCompiler.fromArgs([
505505
* '--dir', 'security',
506506
* '--skip-zk',
507-
* '+0.24.0'
507+
* '+0.25.0'
508508
* ]);
509509
*
510510
* // With environment variable

compact/src/runBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { CompactBuilder } from './Builder.js';
1919
* ℹ [COMPILE] COMPACTC_PATH: /path/to/compactc/compactc
2020
* ℹ [COMPILE] Found 1 .compact file(s) to compile
2121
* ✔ [COMPILE] [1/1] Compiled Foo.compact
22-
* Compactc version: 0.24.0
22+
* Compactc version: 0.25.0
2323
* ✔ [BUILD] [1/3] Compiling TypeScript
2424
* ✔ [BUILD] [2/3] Copying artifacts
2525
* ✔ [BUILD] [3/3] Copying and cleaning .compact files

0 commit comments

Comments
 (0)