Skip to content

Latest commit

 

History

History
59 lines (53 loc) · 12.2 KB

File metadata and controls

59 lines (53 loc) · 12.2 KB

MEMORY.md

Memo

  • lip.sln exists at the repo root and currently includes the main code projects under src/ plus test projects under tests/; Lip.Installer is referenced by the release workflow but its project files may not always be present in the working tree.
  • Lip.Cli/Program.cs is a thin Spectre.Console front end; most operational wiring happens in LipClient.Create, which constructs ConfigService, CacheService, SourceService, WorkspaceService, PackageInstaller, CompositePackageRegistry, and InstallService.
  • Workspace state is persisted in tooth_lock.json in the current working directory; it stores installed package manifests, variant labels, explicit/implicit status, and tracked file paths.
  • Global runtime config is persisted in liprc.json under Environment.SpecialFolder.ApplicationData in lip/liprc.json; cache and temp data live under Environment.SpecialFolder.LocalApplicationData in lip/cache and lip/temp.
  • tooth.json is the package manifest and lip init creates a minimal one, but current install/uninstall flows do not mutate tooth.json; they operate on workspace files plus tooth_lock.json.
  • Durable docs caveat: docs/faq.md matches the current implementation on tooth.json, but docs/intro/quick_start.md still says install/uninstall update the manifest; trust the code and FAQ over that quick-start wording.
  • Manifest, runtime config, and workspace state all use format version 3 with UUID 289f771f-2c9a-4d73-9f3f-8492495a924d.
  • Package argument parsing in LipClient tries, in order: exact PackageSpec, flexible PackageId, local archive path, then remote archive URL.
  • Package source retrieval prefers Go module proxy first and Git second; download URLs may be rewritten through github_proxy, and go_module_proxy defaults to https://goproxy.io.
  • Git fallback currently caches cloned repositories as directories via CacheService.GetOrCreateDirectory; this is fragile because .git contents can make cache clean deletion fail and directory-structured cache entries are riskier than file-archive cache artifacts.
  • Package registry lookup is layered: installed workspace packages first, then remote registries (GoModuleProxyPackageRegistry, LiprPackageRegistry, GitPackageRegistry), then source-derived manifests.
  • With dependencies enabled, install/uninstall/update recompute the full desired dependency graph from explicitly installed packages, uninstall removed packages in reverse topological order, then install new ones in topological order.
  • --no-dependencies bypasses dependency solving and is explicitly treated as potentially leaving a broken workspace.
  • Package variants are merged by label and current RID platform match; platform matching supports glob patterns and requires at least one full label+platform match.
  • Package install order is: run pre-install scripts, place asset files, run install/post-install scripts, then record workspace state. Uninstall runs pre-uninstall/uninstall scripts, removes tracked files except preserve_files, applies remove_files, runs post-uninstall scripts, then removes state.
  • CI expectations for code changes are dotnet format --verify-no-changes lip.sln and dotnet test lip.sln; docs are a separate VitePress project under docs/ built with pnpm build.
  • Docs tooling now uses pnpm; docs/ should keep package.json plus pnpm-lock.yaml, not package-lock.json, and docs verification should be run with pnpm build.
  • Native npm distribution is driven from npm/; the single @futrime/lip package exposes root launchers lip.js and lipd.js, bundles both lip and lipd for all six supported platforms in root-level platform folders like linux-x64/ and win32-x64/, and the release workflow rewrites the package version from the release event tag before publishing.
  • The published winget manifest for futrime.lip 0.34.3 declares Dependencies.PackageDependencies: Microsoft.DotNet.Runtime.10; the npm package now bootstraps .NET Runtime 10 in postinstall.js by silently invoking the official dotnet-install scripts on all supported platforms, and npm/lip.js plus npm/lipd.js set DOTNET_ROOT to the default install root when a user-level runtime is present.
  • Public install docs now standardize on the npm package for all platforms, documenting both npm install -g @futrime/lip and one-off npx @futrime/lip ... usage; Windows-only alternatives are limited to winget and release setup.exe, and the old scripts/install.sh plus build-from-source installation docs were removed.
  • GitHub release automation now uploads GitHub Release archives directly inside each build matrix run after artifact upload; publish-npm still downloads all six build artifacts, copies their binaries into the staged @futrime/lip package, and publishes one npm package version derived from github.event.release.tag_name with a shell-side v prefix trim.
  • For the single-package npm distribution, dotnet publish must include both -r <runtime> and --no-self-contained; this keeps PublishSingleFile=true outputs framework-dependent and small enough for npm publish. Without --no-self-contained, each binary grows to roughly 75-90 MB and the combined npm tarball becomes too large for npm CLI publish.
  • npm CLI 11 rejects prerelease publishes unless npm publish includes an explicit --tag; for versions like 0.34.2-fd.1, release CI should publish with dist-tag fd rather than relying on npm defaults.
  • publish-npm now relies on GitHub OIDC trusted publishing rather than injecting NODE_AUTH_TOKEN; the job needs permissions: { contents: read, id-token: write } for npm trusted publisher exchange.
  • Windows installer packaging no longer uses the removed src/Lip.Installer WiX project; release CI now builds lip-<version>-<runtime>-setup.exe from inno/lip.iss, which expects downloaded binaries under .tmp/artifacts and writes installers to .tmp/nsis.
  • inno/lip.iss must not branch on an undeclared Runtime preprocessor symbol; release CI should pass the resolved Windows installer architecture explicitly (for example BuildArch=arm64 or x64compatible) into Inno Setup.
  • Windows setup.exe now installs the .NET Runtime 10 prerequisite online during PrepareToInstall: it first checks HKLM32\SOFTWARE\dotnet\Setup\InstalledVersions\<arch>\InstallLocation for Microsoft.NETCore.App\10.*, falls back to the default arch-specific global path if needed, then downloads Runtime/10.0/latest.version from builds.dotnet.microsoft.com and silently runs the matching official dotnet-runtime-<version>-win-{x64|arm64}.exe with /install /quiet /norestart.

Recent

  • 2026-03-24: npm installation now bootstraps .NET Runtime 10 on Windows, Linux, and macOS via npm/postinstall.js, which silently invokes the official dotnet-install script at package install time; the launchers also set DOTNET_ROOT when a user-level runtime exists, while postinstall skips reinstalling if either the default install root or dotnet --list-runtimes already reports Microsoft.NETCore.App 10.x.
  • 2026-03-24: Confirmed distribution runtime handling now differs by channel: Windows setup.exe bootstraps .NET Runtime 10 inside inno/lip.iss, winget 0.34.3 relies on Dependencies.PackageDependencies: Microsoft.DotNet.Runtime.10 in winget-pkgs, and npm still lacks any runtime bootstrap beyond spawning the bundled framework-dependent binaries.
  • 2026-03-24: Updated .github/workflows/build-docs.yml to install docs dependencies with pnpm install --frozen-lockfile and build with pnpm build, keeping CI aligned with the repo-wide pnpm rule and docs/pnpm-lock.yaml.
  • 2026-03-24: Switched the docs workspace lockfile from package-lock.json to pnpm-lock.yaml so the repo's JavaScript workflow consistently uses pnpm.
  • 2026-03-24: Added npx @futrime/lip ... to the install docs as a supported one-off execution path because the published npm package exposes lip through its bin entry and bundles native binaries for each supported platform.
  • 2026-03-24: Removed the Linux/macOS shell installer script scripts/install.sh and rewrote install docs to prefer npm install -g @futrime/lip everywhere, with Windows-specific winget and setup.exe alternatives only.
  • 2026-03-24: inno/lip.iss now installs .NET Runtime 10 online as a Windows setup prerequisite before copying app files, using the 32-bit registry HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\<arch>\InstallLocation to detect global runtime installs and script-local default DotNetRuntimeChannel=10.0 plus DotNetRuntimeMajor=10 defines to parameterize the Inno build.
  • 2026-03-24: CHANGELOG.md now documents 0.34.3 as the stable release that restores framework-dependent single-file publish output for release artifacts and formalizes the new native npm package plus Inno Setup installers in user-facing release notes.
  • 2026-03-24: Minionguyjpro/Inno-Setup-Action@v1.2.7 reads with.options via getMultilineInput(), so workflow options: must use a literal block (|) rather than folded YAML (>-) when passing multiple /D... compiler arguments; otherwise Inno Setup receives one combined argument and later defines like BuildArch stay undefined.

History

  • 2026-03-24: npm release/publish workflow now uses OIDC trusted publishing, prerelease dist-tags derived from the SemVer prerelease label, and package-install-time .NET runtime bootstrap in npm/postinstall.js; create-windows-installer uses fail-fast: false, derives archive suffixes from BuildArch, and avoids branching on an undeclared Runtime symbol in inno/lip.iss.
  • 2026-03-24: Release workflow now derives version strings directly from github.event.release.tag_name, standard verification should target root lip.sln, Windows packaging uses the create-windows-installer matrix with inno/lip.iss to produce both win-x64 and win-arm64 setup.exe artifacts and update PATH, and the 2026-03-23 npm packaging changes consolidated around the single-package @futrime/lip layout with root launchers, flattened platform payload folders, build-artifact uploads, and 0.34.2-fd.0 published as the framework-dependent npm recovery release.
  • 2026-03-23: Minimized npm release CI in .github/workflows/release.yml by deriving npm versions from the release tag and publishing platform packages directly from build artifacts instead of downloading GitHub Release archives.
  • 2026-03-23: Refactored .github/workflows/release.yml so the npm publish jobs use separate GitHub Actions steps for package staging, asset download, package version rewriting, binary extraction, and npm publish.
  • 2026-03-23: Simplified npm release CI by deleting npm/scripts/stage-pnpm-release.sh and npm/scripts/publish-pnpm-release.sh; .github/workflows/release.yml now uses a matrix job for platform packages plus a follow-up job for @futrime/lip.
  • 2026-03-23: Wired npm publishing into .github/workflows/release.yml as a publish-npm job that runs after release assets are uploaded and uses the NPM_TOKEN secret for npm auth.
  • 2026-03-23: Removed the temporary root package.json and pnpm-workspace.yaml; npm publishing is now driven directly by the scripts under npm/scripts/.
  • 2026-03-23: Moved the npm publish helper scripts under npm/scripts/ and confirmed staging still works from the new location.
  • 2026-03-23: The original @futrime/lip@0.34.2 npm record was later unpublished, which blocks re-publishing the same version; the framework-dependent replacement was published as 0.34.2-fd.0 instead.
  • 2026-03-23: Added a pnpm-based native npm distribution layout for @futrime/lip plus six platform packages, staging binaries from GitHub Release assets instead of local builds; verified all seven packages pass pnpm publish --dry-run for v0.34.2, with actual publish currently blocked only by missing npm auth.
  • 2026-03-23: Initialized repo memory from code/docs/CI and recorded the Git source fallback caveat about directory-based cache entries making cache clean brittle on .git contents.
  • 2026-03-23: Merged two conflicting AGENTS.md templates into one repo-specific policy file, removed Python/Notion workflow rules, and aligned instructions with the repo's .NET and docs build workflows.
  • 2026-03-23: Fixed MEMORY.md structure to match policy, with Memo, Recent, History, and normalized Memo casing.