diff --git a/CHANGELOG b/CHANGELOG index 569e2c7d7..3c7d14bfc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,6 +15,14 @@ This project _loosely_ adheres to [Semantic Versioning](https://semver.org/spec/ ### Fixed +## [0.5.1] - 25/07/2023 + +### Fixed + - Added missing Prolog declarations for new SDNA predicates `collection_adder/collection_remover`, fixing breaking apps using SDNA Subject Classes that don't have collections defined [PR#398](https://github.com/coasys/ad4m/pull/398) + - Replaced old and depreciated link to AD4Min launcher in docs with link to ADAM Launcher releases [PR#393](https://github.com/coasys/ad4m/pull/393) + +### Changed + - Moved code that deals with the IPFS repo lock from JS to Rust, improving (in most cases: unblocking) startup of the Launcher on Windows [PR#392](https://github.com/coasys/ad4m/pull/392) ## [0.5.0] - 10/07/2023 ### Added diff --git a/Cargo.lock b/Cargo.lock index ae93c73b2..326e26be5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,7 +10,7 @@ checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" [[package]] name = "ad4m" -version = "0.5.0" +version = "0.5.1" dependencies = [ "ad4m-client", "anyhow", @@ -32,7 +32,7 @@ dependencies = [ [[package]] name = "ad4m-client" -version = "0.5.0" +version = "0.5.1" dependencies = [ "anyhow", "async-std", @@ -59,7 +59,7 @@ dependencies = [ [[package]] name = "ad4m-launcher" -version = "0.5.0" +version = "0.5.1" dependencies = [ "ad4m-client", "directories", diff --git a/bootstrap-languages/agent-language/package.json b/bootstrap-languages/agent-language/package.json index f4f7e8c41..382f6ad77 100644 --- a/bootstrap-languages/agent-language/package.json +++ b/bootstrap-languages/agent-language/package.json @@ -1,6 +1,6 @@ { "name": "@perspect3vism/agent-language", - "version": "0.5.0", + "version": "0.5.1", "description": "AD4M Language implementation for Holochain profile DNA", "main": "index.js", "scripts": { diff --git a/bootstrap-languages/direct-message-language/package.json b/bootstrap-languages/direct-message-language/package.json index 681489c38..ae537acee 100644 --- a/bootstrap-languages/direct-message-language/package.json +++ b/bootstrap-languages/direct-message-language/package.json @@ -1,6 +1,6 @@ { "name": "@perspect3vism/direct-message-language", - "version": "0.5.0", + "version": "0.5.1", "description": "A templateable AD4M Language for personal, per-agent direct message Languages", "main": "index.js", "scripts": { diff --git a/bootstrap-languages/neighbourhood-language/package.json b/bootstrap-languages/neighbourhood-language/package.json index 55dcc2213..edf258988 100644 --- a/bootstrap-languages/neighbourhood-language/package.json +++ b/bootstrap-languages/neighbourhood-language/package.json @@ -1,6 +1,6 @@ { "name": "@perspect3vism/neighbourhood-language", - "version": "0.5.0", + "version": "0.5.1", "description": "This is a Language for storing AD4M neighbourhood objects", "main": "index.js", "scripts": { diff --git a/bootstrap-languages/p-diff-sync/package.json b/bootstrap-languages/p-diff-sync/package.json index 2d28b9a63..1346ce491 100644 --- a/bootstrap-languages/p-diff-sync/package.json +++ b/bootstrap-languages/p-diff-sync/package.json @@ -1,6 +1,6 @@ { "name": "@perspect3vism/perspective-diff-sync", - "version": "0.5.0", + "version": "0.5.1", "description": "An AD4M language for syncing mutations to a share perspective", "main": "index.js", "scripts": { diff --git a/bootstrap-languages/perspective-language/package.json b/bootstrap-languages/perspective-language/package.json index 3e1f6b809..2daee7330 100644 --- a/bootstrap-languages/perspective-language/package.json +++ b/bootstrap-languages/perspective-language/package.json @@ -1,6 +1,6 @@ { "name": "@perspect3vism/perspective-language", - "version": "0.5.0", + "version": "0.5.1", "description": "An AD4M Language for perspective snapshot expressions stored on IPFS", "main": "index.js", "scripts": { diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 851ac2c16..fa9f74014 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ad4m" -version = "0.5.0" +version = "0.5.1" edition = "2021" authors = ["Nicolas Luck "] description = "A command-line interface to AD4M (i.e. the AD4M executor) - https://ad4m.dev" @@ -12,7 +12,7 @@ documentation = "https://docs.ad4m.dev" readme = "README.md" [dependencies] -ad4m-client = { path = "../rust-client", version = "0.5.0" } +ad4m-client = { path = "../rust-client", version = "0.5.1" } anyhow = "1.0.65" clap = { version = "4.0.8", features = ["derive"] } futures = "0.3" diff --git a/connect/package.json b/connect/package.json index a0c5b569c..b79f8e2e7 100644 --- a/connect/package.json +++ b/connect/package.json @@ -1,6 +1,6 @@ { "name": "@perspect3vism/ad4m-connect", - "version": "0.5.0", + "version": "0.5.1", "description": "Lib for handling everything needed to setup a connection to a local or remote ad4m-executor", "license": "CAL-1.0", "main": "dist/web.js", diff --git a/core/package.json b/core/package.json index b3de791e2..3aa32d3d7 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "@perspect3vism/ad4m", - "version": "0.5.0", + "version": "0.5.1", "description": "*The Agent-Centric Distributed Application Meta-ontology* or just: *Agent-Centric DApp Meta-ontology* * A new meta-ontology for interoperable, decentralized application design * A spanning-layer to enable seamless integration between Holochain DNAs, blockchains, linked-data structures/ontologies and centralized back-ends * The basis for turning distinct, monolithic and siloed apps into a global, open and interoperable sense-making network", "main": "lib/index.cjs", "module": "lib/index.js", diff --git a/docs/package.json b/docs/package.json index f3555951c..5f581b86e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "@perspect3vism/ad4m-docs", - "version": "0.5.0", + "version": "0.5.1", "description": "Documentation for AD4M", "license": "CAL-1.0", "homepage": "./", diff --git a/docs/pages/installation.mdx b/docs/pages/installation.mdx index 31b71b147..245e95692 100644 --- a/docs/pages/installation.mdx +++ b/docs/pages/installation.mdx @@ -8,7 +8,7 @@ System Requirements: ### Install AD4M Launcher Download the latest version of the AD4M launcher from -its [GitHub release page](https://github.com/perspect3vism/ad4min/releases) and run/install it. +its [GitHub release page](https://github.com/coasys/ad4m/releases) and run/install it. After creating an agent, you should see an AD4M system-tray icon which will bring up an AD4M pop-up window when you click it: diff --git a/executor/package.json b/executor/package.json index 250df748c..7e9a8abcc 100644 --- a/executor/package.json +++ b/executor/package.json @@ -1,6 +1,6 @@ { "name": "@perspect3vism/ad4m-executor", - "version": "0.5.0", + "version": "0.5.1", "description": "Node.js package that allows the running/interfacing of AD4M Languages & Perspectives.", "main": "lib/main.js", "files": [ diff --git a/executor/src/core/Config.ts b/executor/src/core/Config.ts index bb0fde4b0..b8395cf5d 100644 --- a/executor/src/core/Config.ts +++ b/executor/src/core/Config.ts @@ -2,7 +2,7 @@ import * as path from 'path'; import * as fs from 'fs'; import { Address, Expression } from '@perspect3vism/ad4m'; -export let ad4mExecutorVersion = "0.5.0"; +export let ad4mExecutorVersion = "0.5.1"; export let agentLanguageAlias = "did"; export let languageLanguageAlias = "lang"; export let neighbourhoodLanguageAlias = "neighbourhood"; diff --git a/executor/src/core/Perspective.ts b/executor/src/core/Perspective.ts index 7f75f3b3b..42e5655b1 100644 --- a/executor/src/core/Perspective.ts +++ b/executor/src/core/Perspective.ts @@ -882,8 +882,11 @@ export default class Perspective { lines.push(":- dynamic property_resolve/2.") lines.push(":- dynamic property_resolve_language/3.") lines.push(":- dynamic property_named_option/4.") + lines.push(":- dynamic collection/2.") lines.push(":- dynamic collection_getter/4.") lines.push(":- dynamic collection_setter/3.") + lines.push(":- dynamic collection_remover/3.") + lines.push(":- dynamic collection_adder/3.") lines.push(":- dynamic p3_class_icon/2.") lines.push(":- dynamic p3_class_color/2.") lines.push(":- dynamic p3_instance_color/3.") @@ -897,8 +900,11 @@ export default class Perspective { lines.push(":- discontiguous property_resolve/2.") lines.push(":- discontiguous property_resolve_language/3.") lines.push(":- discontiguous property_named_option/4.") + lines.push(":- discontiguous collection/2.") lines.push(":- discontiguous collection_getter/4.") lines.push(":- discontiguous collection_setter/3.") + lines.push(":- discontiguous collection_remover/3.") + lines.push(":- discontiguous collection_adder/3.") lines.push(":- discontiguous p3_class_icon/2.") lines.push(":- discontiguous p3_class_color/2.") lines.push(":- discontiguous p3_instance_color/3.") diff --git a/executor/src/core/PerspectivismCore.ts b/executor/src/core/PerspectivismCore.ts index cd8a2eec4..7da4baa1d 100644 --- a/executor/src/core/PerspectivismCore.ts +++ b/executor/src/core/PerspectivismCore.ts @@ -139,20 +139,6 @@ export default class PerspectivismCore { async initIPFS(params: InitIPFSParams) { console.log("Init IPFS service with port ", params.ipfsSwarmPort, " at path: ", params.ipfsRepoPath); - let basePath = params.ipfsRepoPath ? params.ipfsRepoPath : path.join(this.#config.dataPath, "ipfs"); - let repoPath = path.join(basePath, "repo.lock"); - console.log("Check if repo.lock exists at: ", repoPath); - - let retries = 0; - while (fs.existsSync(repoPath)) { - await sleep(1000); - retries++; - if (retries >= 10) { - console.log("Waited long enough for repo.lock to be released, deleting..."); - fs.rmdirSync(repoPath, { recursive: true }); - fs.rmSync(path.join(basePath, "datastore", "LOCK")); - } - } let ipfs = await IPFS.init(params.ipfsSwarmPort, params.ipfsRepoPath); this.#IPFS = ipfs; diff --git a/host/package.json b/host/package.json index dc8712d09..2ff048532 100644 --- a/host/package.json +++ b/host/package.json @@ -1,6 +1,6 @@ { "name": "ad4m-host", - "version": "0.5.0", + "version": "0.5.1", "description": "Self hosting ad4m service", "private": true, "bin": { diff --git a/package.json b/package.json index 2685ac4f9..b4f644cd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ad4m-monorepo", - "version": "0.5.0", + "version": "0.5.1", "workspaces": [ "core", "docs", diff --git a/rust-client/Cargo.toml b/rust-client/Cargo.toml index b7ba46467..c4a966717 100644 --- a/rust-client/Cargo.toml +++ b/rust-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ad4m-client" -version = "0.5.0" +version = "0.5.1" edition = "2021" authors = ["Nicolas Luck "] description = "Client library wrapping AD4M's GraphQL interface" diff --git a/test-runner/package.json b/test-runner/package.json index 498b8c9a4..3d13e90d8 100644 --- a/test-runner/package.json +++ b/test-runner/package.json @@ -1,6 +1,6 @@ { "name": "@perspect3vism/ad4m-test", - "version": "0.5.0", + "version": "0.5.1", "description": "Testing library to test ad4m languages", "license": "MIT", "bin": "./build/cli.js", diff --git a/ui/package.json b/ui/package.json index 8b8162055..addc2368d 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "ad4m-launcher", - "version": "0.5.0", + "version": "0.5.1", "private": true, "type": "module", "dependencies": { diff --git a/ui/src-tauri/Cargo.toml b/ui/src-tauri/Cargo.toml index 5150da465..b38c23931 100644 --- a/ui/src-tauri/Cargo.toml +++ b/ui/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ad4m-launcher" -version = "0.5.0" +version = "0.5.1" description = "Administration of ad4m services" authors = ["Kaichao Sun"] license = "" diff --git a/ui/src-tauri/src/main.rs b/ui/src-tauri/src/main.rs index 417ebd7bf..56cd837f1 100644 --- a/ui/src-tauri/src/main.rs +++ b/ui/src-tauri/src/main.rs @@ -74,6 +74,18 @@ fn main() { let _ = remove_dir_all(data_path()); } + let mut waited_seconds = 0; + while data_path().join("ipfs").join("repo.lock").exists() { + println!("IPFS repo.lock exists, waiting..."); + std::thread::sleep(std::time::Duration::from_secs(1)); + waited_seconds = waited_seconds + 1; + if waited_seconds > 10 { + println!("Waited long enough, removing lock..."); + let _ = remove_dir_all(data_path().join("ipfs").join("repo.lock")); + let _ = remove_dir_all(data_path().join("ipfs").join("datastore").join("LOCK")); + } + } + if let Err(err) = setup_logs() { println!("Error setting up the logs: {:?}", err); } diff --git a/ui/src-tauri/tauri.conf.json b/ui/src-tauri/tauri.conf.json index 5b074f7bf..0ae8b9db5 100644 --- a/ui/src-tauri/tauri.conf.json +++ b/ui/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "package": { "productName": "AD4M", - "version": "0.5.0" + "version": "0.5.1" }, "build": { "distDir": "../dist",