Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# and instead sizes the job count from currently-available memory, so several
# concurrent builds on one machine self-throttle instead of all assuming the
# full core count and tripping earlyoom/OOM. Override either path explicitly
# with CARGO_BUILD_JOBS / KCODE_BUILD_JOBS.
# with CARGO_BUILD_JOBS / JCODE_BUILD_JOBS.
#
# The largest rustc unit (kcode-base) peaks at ~1.6 GiB RSS (was 2.5-3 GiB as a
# The largest rustc unit (jcode-base) peaks at ~1.6 GiB RSS (was 2.5-3 GiB as a
# monolith), so 4 jobs (~6-7 GiB) keeps a single direct build comfortably
# memory-safe on a ~15 GiB machine while staying parallel. The adaptive
# dev_cargo.sh path uses more cores when memory allows.
Expand Down
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/scripts/generate_star_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def fetch_stars(repository: str, token: str) -> list[dt.date]:
headers={
"Accept": "application/vnd.github.star+json",
"Authorization": f"Bearer {token}",
"User-Agent": "kcode-star-history",
"User-Agent": "jcode-star-history",
"X-GitHub-Api-Version": "2022-11-28",
},
)
Expand Down Expand Up @@ -118,7 +118,7 @@ def y(value: int) -> float:

def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument("--repo", default="1jehuang/kcode")
parser.add_argument("--repo", default="1jehuang/jcode")
parser.add_argument("--output", type=Path, default=Path("docs/images/star-history.svg"))
args = parser.parse_args()
token = os.environ.get("GITHUB_TOKEN") or os.environ.get("GH_TOKEN")
Expand Down
34 changes: 17 additions & 17 deletions .github/scripts/verify_windows_install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ $originalEnvironment = @{
LOCALAPPDATA = $env:LOCALAPPDATA
APPDATA = $env:APPDATA
USERPROFILE = $env:USERPROFILE
KCODE_HOME = $env:KCODE_HOME
KCODE_WINDOWS_SETUP_SKIP_PROCESS_LIFECYCLE = $env:KCODE_WINDOWS_SETUP_SKIP_PROCESS_LIFECYCLE
JCODE_HOME = $env:JCODE_HOME
JCODE_WINDOWS_SETUP_SKIP_PROCESS_LIFECYCLE = $env:JCODE_WINDOWS_SETUP_SKIP_PROCESS_LIFECYCLE
}

if (-not $Version) {
Expand All @@ -24,30 +24,30 @@ if (-not $Version) {
}

$artifactVersionText = ($artifactVersionOutput -join "`n")
if ($artifactVersionText -notmatch '(?i)\bkcode\s+v?(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)\b') {
throw "Could not parse kcode version from local artifact output: $artifactVersionText"
if ($artifactVersionText -notmatch '(?i)\bjcode\s+v?(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)\b') {
throw "Could not parse jcode version from local artifact output: $artifactVersionText"
}
$Version = 'v' + $Matches[1]
} else {
$Version = 'v' + (($Version.Trim()) -replace '^[vV]', '')
}

$tempBase = if ($env:RUNNER_TEMP) { $env:RUNNER_TEMP } else { $env:TEMP }
$tempRoot = Join-Path $tempBase ("kcode-windows-install-verify-" + [guid]::NewGuid().ToString('N'))
$tempRoot = Join-Path $tempBase ("jcode-windows-install-verify-" + [guid]::NewGuid().ToString('N'))
$localAppData = Join-Path $tempRoot 'localappdata'
$appData = Join-Path $tempRoot 'appdata'
$userProfile = Join-Path $tempRoot 'userprofile'
$kcodeHome = Join-Path $tempRoot '.kcode'
$installDir = Join-Path $localAppData 'kcode\bin'
$jcodeHome = Join-Path $tempRoot '.jcode'
$installDir = Join-Path $localAppData 'jcode\bin'

try {
New-Item -ItemType Directory -Force -Path $localAppData, $appData, $userProfile, $kcodeHome | Out-Null
New-Item -ItemType Directory -Force -Path $localAppData, $appData, $userProfile, $jcodeHome | Out-Null

$env:LOCALAPPDATA = $localAppData
$env:APPDATA = $appData
$env:USERPROFILE = $userProfile
$env:KCODE_HOME = $kcodeHome
$env:KCODE_WINDOWS_SETUP_SKIP_PROCESS_LIFECYCLE = '1'
$env:JCODE_HOME = $jcodeHome
$env:JCODE_WINDOWS_SETUP_SKIP_PROCESS_LIFECYCLE = '1'

$installScript = Join-Path $repoRoot 'scripts\install.ps1'

Expand All @@ -56,18 +56,18 @@ $installScript = Join-Path $repoRoot 'scripts\install.ps1'
-Version $Version `
-ArtifactExePath $resolvedArtifact

$launcherPath = Join-Path $installDir 'kcode.exe'
$versionDir = Join-Path $localAppData ('kcode\builds\versions\' + $Version.TrimStart('v') + '\kcode.exe')
$stablePath = Join-Path $localAppData 'kcode\builds\stable\kcode.exe'
$launcherPath = Join-Path $installDir 'jcode.exe'
$versionDir = Join-Path $localAppData ('jcode\builds\versions\' + $Version.TrimStart('v') + '\jcode.exe')
$stablePath = Join-Path $localAppData 'jcode\builds\stable\jcode.exe'

foreach ($path in @($launcherPath, $versionDir, $stablePath)) {
if (-not (Test-Path -LiteralPath $path)) {
throw "Expected installed file missing: $path"
}
}

$hotkeyDir = Join-Path $kcodeHome 'hotkey'
$startupShortcut = Join-Path $appData 'Microsoft\Windows\Start Menu\Programs\Startup\kcode-hotkey.lnk'
$hotkeyDir = Join-Path $jcodeHome 'hotkey'
$startupShortcut = Join-Path $appData 'Microsoft\Windows\Start Menu\Programs\Startup\jcode-hotkey.lnk'
if (Test-Path -LiteralPath $hotkeyDir) {
throw "Default install unexpectedly created optional hotkey files: $hotkeyDir"
}
Expand All @@ -80,7 +80,7 @@ if ($LASTEXITCODE -ne 0) {
throw "Installed launcher failed to run --version"
}

if ($versionOutput -notmatch 'kcode') {
if ($versionOutput -notmatch 'jcode') {
throw "Installed launcher returned unexpected version output: $versionOutput"
}

Expand Down Expand Up @@ -122,7 +122,7 @@ if ($shortcut.Arguments -match '(?i)\bBypass\b') {
throw "Hotkey shortcut unexpectedly bypasses PowerShell execution policy"
}

$legacyVbs = Join-Path $hotkeyDir 'kcode-hotkey-launcher.vbs'
$legacyVbs = Join-Path $hotkeyDir 'jcode-hotkey-launcher.vbs'
if (Test-Path -LiteralPath $legacyVbs) {
throw "Legacy VBScript hotkey launcher still exists: $legacyVbs"
}
Expand Down
Loading
Loading