diff --git a/.github/workflows/nightly.sh b/.github/workflows/nightly.sh deleted file mode 100755 index 15ae36a..0000000 --- a/.github/workflows/nightly.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# Switch to nightly - -# Calculate version -VERSION=`git log -1 --format=%cd --date="format:%Y.%-m.%-d%H"` -COMMIT=`git log -1 --format=%H` - -# Change parameters in package.json -(cat package.json | jq --indent 4 --arg VERSION "${VERSION}" ' -.version=$VERSION | -.preview=true | -.name="vscode-tlaplus-nightly" | -.displayName="TLA+ Nightly" | -.description="TLA+ language support (Nightly)" | -.icon="resources/images/tlaplus-nightly.png" -') > /tmp/package.json.nightly && mv /tmp/package.json.nightly package.json - -# Add version info to CHANGELOG.md -printf "## ${VERSION}\n\nCommit ${COMMIT}\n\n" | cat - CHANGELOG.md > /tmp/CHANGELOG.md.nightly && mv /tmp/CHANGELOG.md.nightly CHANGELOG.md - -# Add header to README.md -tail -n +2 README.md | cat README-nightly.md - > /tmp/README.md.nightly && mv /tmp/README.md.nightly README.md diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml deleted file mode 100644 index ac2b18c..0000000 --- a/.github/workflows/pre-release.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Pre-Release - -on: - workflow_dispatch: - inputs: - suffix: - description: 'Version suffix' - required: true - default: 'alpha.X' - -jobs: - build: - runs-on: macOS-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: '18.19' - - name: Get current version - id: version - run: echo "::set-output name=version::$(jq -r .version package.json)" - - name: Install dependencies - run: | - npm install - npm install -g vsce - - name: Build - run: | - npm run vscode:prepublish - vsce package - - name: Check - run: | - npm run lint - npm test --silent - - name: Create Pre-Release - id: create_pre_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: v${{ steps.version.outputs.version }}-${{ github.event.inputs.suffix }} - release_name: v${{ steps.version.outputs.version }}-${{ github.event.inputs.suffix }} - draft: false - prerelease: true - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_pre_release.outputs.upload_url }} - asset_path: vscode-tlaplus-${{ steps.version.outputs.version }}.vsix - asset_name: vscode-tlaplus-${{ steps.version.outputs.version }}.vsix - asset_content_type: application/zip diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml deleted file mode 100644 index b9dd048..0000000 --- a/.github/workflows/release-nightly.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Release Nightly - -on: - schedule: - - cron: "0 6 * * *" - repository_dispatch: - workflow_dispatch: - -jobs: - checksecret: - name: check if VSCODE_MARKETPLACE_TOKEN is set in github secrets - runs-on: ubuntu-latest - outputs: - is_MY_SECRET_set: ${{ steps.checksecret_job.outputs.is_MY_SECRET_set }} - steps: - - name: Check secret present - id: checksecret_job - env: - MY_SECRET: ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} - run: | - echo "is_MY_SECRET_set: ${{ env.MY_SECRET != '' }}" - echo "::set-output name=is_MY_SECRET_set::${{ env.MY_SECRET != '' }}" - - build: - ## Do not run this action without the marketplace token present, - ## e.g., in a fork of this repo. - needs: [checksecret] - if: needs.checksecret.outputs.is_MY_SECRET_set == 'true' - runs-on: macOS-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: '18.19' - - name: Get (nightly) TLC - run: wget https://nightly.tlapl.us/dist/tla2tools.jar -O tools/tla2tools.jar - - name: Get (nightly) CommunityModules - run: wget https://github.com/tlaplus/CommunityModules/releases/latest/download/CommunityModules-deps.jar -O tools/CommunityModules-deps.jar - - name: Prepare nightly - run: | - git add tools/*.jar -f - git commit -m "Snapshot latest CommunityModules and TLA+ tools" - .github/workflows/nightly.sh - git diff package.json - - name: Get current version - id: version - run: echo "::set-output name=version::$(jq -r .version package.json)" - - name: Install dependencies - run: | - npm install - npm install -g vsce - - name: Build - run: | - npm run vscode:prepublish - vsce package - - name: Check - run: | - npm run lint - npm test --silent - - name: Publish to Marketplace - run: vsce publish --pat "${{ secrets.VSCODE_MARKETPLACE_TOKEN }}" - ## Continue publishing to the ovsx marketplace even if publication to the VSCode marketplace fails. - continue-on-error: true - - name: Publish to Open VSX - run: npx ovsx publish "vscode-tlaplus-nightly-${{ steps.version.outputs.version }}.vsix" -p "${{ secrets.OPEN_VSX_TOKEN }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ad95c2..b3aa27b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,18 +1,49 @@ name: Release -on: workflow_dispatch +on: + schedule: + - cron: "0 6 * * *" + repository_dispatch: + workflow_dispatch: jobs: + checksecret: + name: check if VSCODE_MARKETPLACE_TLAPLUS_TOKEN is set in github secrets + runs-on: ubuntu-latest + outputs: + is_MY_SECRET_set: ${{ steps.checksecret_job.outputs.is_MY_SECRET_set }} + steps: + - name: Check secret present + id: checksecret_job + env: + MY_SECRET: ${{ secrets.VSCODE_MARKETPLACE_TLAPLUS_TOKEN }} + run: | + echo "is_MY_SECRET_set: ${{ env.MY_SECRET != '' }}" + echo "::set-output name=is_MY_SECRET_set::${{ env.MY_SECRET != '' }}" + build: + ## Do not run this action without the marketplace token present, + ## e.g., in a fork of this repo. + needs: [checksecret] + if: needs.checksecret.outputs.is_MY_SECRET_set == 'true' runs-on: macOS-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: node-version: '18.19' + - name: Get (latest) TLC + run: wget https://nightly.tlapl.us/dist/tla2tools.jar -O tools/tla2tools.jar + - name: Get (latest) CommunityModules + run: wget https://github.com/tlaplus/CommunityModules/releases/latest/download/CommunityModules-deps.jar -O tools/CommunityModules-deps.jar + - name: Prepare Release + run: | + ## Create a git commit to use its date as the extension's version number below. + git add tools/*.jar -f + git commit -m "Latest CommunityModules and TLA+ tools" - name: Get current version id: version - run: echo "::set-output name=version::$(jq -r .version package.json)" + run: echo "::set-output name=version::$(git log -1 --format=%cd --date="format:%Y.%-m.%-d%H%M")" - name: Install dependencies run: | npm install @@ -26,26 +57,5 @@ jobs: npm run lint npm test --silent - name: Publish to Marketplace - run: vsce publish --pat "${{ secrets.VSCODE_MARKETPLACE_TOKEN }}" - - name: Publish to Open VSX - run: npx ovsx publish "vscode-tlaplus-${{ steps.version.outputs.version }}.vsix" -p "${{ secrets.OPEN_VSX_TOKEN }}" - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: v${{ steps.version.outputs.version }} - release_name: v${{ steps.version.outputs.version }} - draft: false - prerelease: false - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: vscode-tlaplus-${{ steps.version.outputs.version }}.vsix - asset_name: vscode-tlaplus-${{ steps.version.outputs.version }}.vsix - asset_content_type: application/zip + run: | + vsce publish $(git log -1 --format=%cd --date="format:%Y.%-m.%-d%H%M") --pat "${{ secrets.VSCODE_MARKETPLACE_TLAPLUS_TOKEN }}" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3f2f9b4..4003436 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ For those, who want to write some code, here's a short guide. Clone the repository: ``` -git clone https://github.com/alygin/vscode-tlaplus.git +git clone https://github.com/tlaplus/vscode-tlaplus.git cd vscode-tlaplus ``` @@ -158,7 +158,7 @@ The extension consists of the following components: 3. The implementation of the Check Result View panel that visualizes TLC output and allows to analyze it easily. 4. The `tla2tools.jar` file from the [official TLA+ project](https://github.com/tlaplus/tlaplus). All the specification syntax verifications, PlusCal translations and TLC checks are actually performed by this Java library. -The extension also requires a Java Virtual Machine (JVM) to be installed. [More information](https://github.com/alygin/vscode-tlaplus/wiki/Installing-Java). +The extension also requires a Java Virtual Machine (JVM) to be installed. [More information](https://github.com/tlaplus/vscode-tlaplus/wiki/Installing-Java). # Project Layout diff --git a/LICENSE b/LICENSE index bd35d49..3d4f397 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,8 @@ MIT License Copyright (c) 2019 Andrew Lygin +Copyright (c) 2020 TLA+ Foundation + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README-nightly.md b/README-nightly.md deleted file mode 100644 index 7d98b94..0000000 --- a/README-nightly.md +++ /dev/null @@ -1,10 +0,0 @@ -# TLA+ Nightly for Visual Studio Code - -> **ATTENTION:** This is the preview version of the [TLA+ for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=alygin.vscode-tlaplus) extension, used for early feedback and testing. -> -> **ATTENTION:** Both the stable and nightly versions cannot be used at the same time. You must [disable](https://code.visualstudio.com/docs/editor/extension-marketplace#_disable-an-extension) or [uninstall](https://code.visualstudio.com/docs/editor/extension-marketplace#_uninstall-an-extension) one of them. - -> TLA+ Nightly: -> * Is released more frequently. -> * Includes features and bug fixes that may not have been tested yed. -> * May include nightly builds of the TLA+ tools. diff --git a/README.md b/README.md index d1a2f85..dba4294 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # TLA+ for Visual Studio Code -[![Build Status](https://img.shields.io/github/actions/workflow/status/tlaplus/vscode-tlaplus/ci.yml?branch=master)](https://github.com/tlaplus/vscode-tlaplus/actions?query=workflow%3ACI) [![VS Code extension version](https://img.shields.io/visual-studio-marketplace/i/alygin.vscode-tlaplus?color=blue&label=Stable%20Release&style=flat-square)](https://marketplace.visualstudio.com/items?itemName=alygin.vscode-tlaplus) [![VS Code extension version nightly](https://img.shields.io/visual-studio-marketplace/i/alygin.vscode-tlaplus-nightly?color=blue&label=Nightly%20Build&style=flat-square)](https://marketplace.visualstudio.com/items?itemName=alygin.vscode-tlaplus-nightly) +[![Build Status](https://img.shields.io/github/actions/workflow/status/tlaplus/vscode-tlaplus/ci.yml?branch=master)](https://github.com/tlaplus/vscode-tlaplus/actions?query=workflow%3ACI) [![VS Code extension version](https://img.shields.io/visual-studio-marketplace/i/tlaplus-lang?color=blue&label=Stable%20Release&style=flat-square)](https://marketplace.visualstudio.com/items?itemName=tlaplus-lang) [![VS Code extension version nightly](https://img.shields.io/visual-studio-marketplace/i/tlaplus-lang?color=blue&label=Nightly%20Build&style=flat-square)](https://marketplace.visualstudio.com/items?itemName=tlaplus-lang) This extension adds support for the [TLA+ formal specification language](http://research.microsoft.com/en-us/um/people/lamport/tla/tla.html) to VS Code. It also supports running the TLC model checker on TLA+ specifications. diff --git a/package-lock.json b/package-lock.json index 00256f0..41ef317 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "vscode-tlaplus", - "version": "1.6.0", + "name": "tlaplus-lang", + "version": "1.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "vscode-tlaplus", - "version": "1.6.0", + "name": "tlaplus-lang", + "version": "1.7.0", "license": "MIT", "dependencies": { "@cocalc/ansi-to-react": "^7.0.0", diff --git a/package.json b/package.json index 012b77a..39565f1 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "vscode-tlaplus", - "displayName": "TLA+", - "version": "1.6.0", + "name": "tlaplus-lang", + "displayName": "TLA+ (Temporal Logic of Actions)", + "version": "1.7.0", "description": "TLA+ language support", - "publisher": "alygin", + "publisher": "tlaplus-lang", "license": "MIT", "author": { - "name": "Andrew Lygin" + "name": "TLA+ Community" }, "engines": { "vscode": "^1.82.0" @@ -20,10 +20,10 @@ ], "repository": { "type": "git", - "url": "https://github.com/alygin/vscode-tlaplus.git" + "url": "https://github.com/tlaplus/vscode-tlaplus.git" }, "bugs": { - "url": "https://github.com/alygin/vscode-tlaplus/issues" + "url": "https://github.com/tlaplus/vscode-tlaplus/issues" }, "icon": "resources/images/tlaplus.png", "keywords": [ @@ -334,7 +334,7 @@ "type": "string", "scope": "window", "default": "", - "markdownDescription": "Java options to use when running TLA+ tools. [How it works.](https://github.com/alygin/vscode-tlaplus/wiki/Java-Options)", + "markdownDescription": "Java options to use when running TLA+ tools. [How it works.](https://github.com/tlaplus/vscode-tlaplus/wiki/Java-Options)", "maxLength": 1000 }, "tlaplus.pluscal.options": { diff --git a/src/commands/checkModel.ts b/src/commands/checkModel.ts index fc8fc90..d6fcc2c 100644 --- a/src/commands/checkModel.ts +++ b/src/commands/checkModel.ts @@ -85,7 +85,7 @@ export async function checkModelCustom( return; } // Accept .tla files here because TLC configs and TLA+ modules can share the same file: - // https://github.com/alygin/vscode-tlaplus/issues/220 + // https://github.com/tlaplus/vscode-tlaplus/issues/220 const configFiles = await listFiles(path.dirname(doc.uri.fsPath), (fName) => fName.endsWith('.cfg') || fName.endsWith('.tla')); configFiles.sort(); diff --git a/src/debugger/debugging.ts b/src/debugger/debugging.ts index 9b66aee..e194936 100644 --- a/src/debugger/debugging.ts +++ b/src/debugger/debugging.ts @@ -94,7 +94,7 @@ export async function checkAndDebugSpecCustom( return; } // Accept .tla files here because TLC configs and TLA+ modules can share the same file: - // https://github.com/alygin/vscode-tlaplus/issues/220 + // https://github.com/tlaplus/vscode-tlaplus/issues/220 const configFiles = await listFiles(path.dirname(targetResource.fsPath), (fName) => fName.endsWith('.cfg') || fName.endsWith('.tla')); configFiles.sort(); diff --git a/src/main.ts b/src/main.ts index 1dc3e4c..edd745c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -33,7 +33,7 @@ import { ModuleSearchPathsTreeDataProvider } from './panels/moduleSearchPathsTre const TLAPLUS_FILE_SELECTOR: vscode.DocumentSelector = { scheme: 'file', language: LANG_TLAPLUS }; const TLAPLUS_CFG_FILE_SELECTOR: vscode.DocumentSelector = { scheme: 'file', language: LANG_TLAPLUS_CFG }; -const CHANGELOG_URL = vscode.Uri.parse('https://github.com/alygin/vscode-tlaplus/blob/master/CHANGELOG.md#change-log'); +const CHANGELOG_URL = vscode.Uri.parse('https://github.com/tlaplus/vscode-tlaplus/blob/master/CHANGELOG.md#change-log'); const tlaDocInfos = new TlaDocumentInfos(); @@ -150,7 +150,7 @@ export function activate(context: vscode.ExtensionContext): void { // 393ee2b2443e270bacd9f11fa219c39a88fc987d/src/extension.ts#L63-L84 // Also see wordPattern in tlaplus-lang-config.json that drops "@" // and "'" compared to VSCode's standard wordPattern. - // https://github.com/alygin/vscode-tlaplus/issues/200 + // https://github.com/tlaplus/vscode-tlaplus/issues/200 provideEvaluatableExpression(document: vscode.TextDocument, position: vscode.Position): vscode.ProviderResult { const wordRange = document.getWordRangeAtPosition(position); diff --git a/src/tla2tools.ts b/src/tla2tools.ts index 28005f8..340c37a 100644 --- a/src/tla2tools.ts +++ b/src/tla2tools.ts @@ -10,7 +10,7 @@ import { ToolOutputChannel } from './outputChannels'; import { JavaVersionParser } from './parsers/javaVersion'; // CFG_EXTENSION can be used to fetch all the settings for this extension -const CFG_EXTENSION = '@ext:alygin.vscode-tlaplus'; +const CFG_EXTENSION = '@ext:tlaplus-lang'; const CFG_JAVA_HOME = 'tlaplus.java.home'; const CFG_JAVA_OPTIONS = 'tlaplus.java.options'; diff --git a/tests/suite/parsers/tlc.test.ts b/tests/suite/parsers/tlc.test.ts index 64332c9..1373d8f 100644 --- a/tests/suite/parsers/tlc.test.ts +++ b/tests/suite/parsers/tlc.test.ts @@ -405,7 +405,7 @@ suite('TLC Output Parser Test Suite', () => { }); test('Handles no-line-break message switch', () => { - // https://github.com/alygin/vscode-tlaplus/issues/47 + // https://github.com/tlaplus/vscode-tlaplus/issues/47 return assertOutput('no-line-break-switch.out', TEST_SPEC_FILES, new CheckResultBuilder('no-line-break-switch.out', CheckState.Success, CheckStatus.Finished) .addDColFilePath('/Users/bob/example.tla')