ScoopInstaller / Main

📦 The default bucket for Scoop.
https://scoop.sh
The Unlicense
1.56k stars 931 forks source link

bun(-baseline): Add version 1.1.0 #5672

Closed sitiom closed 3 months ago

sitiom commented 3 months ago

Closes https://github.com/ScoopInstaller/Main/issues/5092

sitiom commented 3 months ago

/verify

sitiom commented 3 months ago

CC @chawyehsu

github-actions[bot] commented 3 months ago

All changes look good.

Wait for review from human collaborators.

bun-baseline

bun

github-actions[bot] commented 3 months ago

All changes look good.

Wait for review from human collaborators.

bun-baseline

bun

sitiom commented 3 months ago

@chawyehsu Can you explain to me what it means to "leak" DLL imports? Perhaps the bun.sh/install.ps1 script is leaking as well?

  $IsBaseline = $ForceBaseline
  if (!$IsBaseline) {
    $IsBaseline = !( `
      Add-Type -MemberDefinition '[DllImport("kernel32.dll")] public static extern bool IsProcessorFeaturePresent(int ProcessorFeature);' `
        -Name 'Kernel32' -Namespace 'Win32' -PassThru `
    )::IsProcessorFeaturePresent(40);
  }
chawyehsu commented 3 months ago

"leak" DLL imports?

That means leaking imported methods to the current PS session, literally. By directly using Add-Type to load assemblies to current session there is no way to unload it unless starting a new session. In most cases, this won't cause issues as imported methods have namespaces specified, but one may not want to have imported methods persistent in current session.

Yeah it's leaking the imported method as well. You may validate [Win32.Kernel32]::IsProcessorFeaturePresent available after runing the install script.

I realize Scoop Core/installer having the same problem though.