atom-community/atom

Does not build, not from AUR or from git clone source with script/build

Jieiku opened this issue · 7 comments

paru atom-community-git
1 aur/atom-community-git 1.63.0_dev_a2bae55a7-1 [+2 ~0.79]
    A hackable text editor for the 21st century, built on Electron, and based on everything we love about our favorite editors.
:: Packages to install (eg: 1 2 3, 1-3):
:: 1
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

Aur (1) atom-community-git-1.63.0_dev_a2bae55a7-1

it eventually errors out with:

apm  2.6.5-atomic.1.0
npm  6.14.17
node 12.18.3 x64
atom unknown
python 3.10.8
git 2.38.1
Installing modules ✗
> atom@1.63.0-dev preinstall /home/jieiku/.cache/paru/clone/atom-community-git/src/atom
> node -e 'process.exit(0)'


npm ERR! code E500
npm ERR! 500 Internal Server Error - GET https://www.atom.io/api/packages/language-shellscript/versions/0.28.2/tarball

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jieiku/.atom/.apm/_logs/2022-11-15T19_55_05_486Z-debug.log
Error: Command failed: /home/jieiku/.cache/paru/clone/atom-community-git/src/atom/apm/node_modules/atom-package-manager/bin/apm install
    at checkExecSyncError (node:child_process:861:11)
    at Object.execFileSync (node:child_process:896:15)
    at module.exports (/home/jieiku/.cache/paru/clone/atom-community-git/src/atom/script/lib/run-apm-install.js:12:16)
    at bootstrap (/home/jieiku/.cache/paru/clone/atom-community-git/src/atom/script/bootstrap.js:56:3)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
==> ERROR: A failure occurred in prepare().
    Aborting...
error: failed to build 'atom-community-git-1.63.0_dev_a2bae55a7-1': 
error: packages failed to build: atom-community-git-1.63.0_dev_a2bae55a7-1

I just tried building from git clone source, but it is the same problem atom.io/api/packages resources that are unavailable

sudo pacman -S --needed gconf base-devel git nodejs npm libsecret python libx11 libxkbfile
git clone https://github.com/atom-community/atom
cd atom
script/build

...

npm ERR! code E500
npm ERR! 500 Internal Server Error - GET https://www.atom.io/api/packages/language-make/versions/0.23.0/tarball

I am guessing this is related: #459

The main atom repository has already fixed some of these issues: atom@2291b59

These changes need to be pulled into atom-community.

For now I am going to clone the main atom github repo and build from source there.

EDIT: got farther with the main atom repo, but did not fully install....

apm  2.6.2
npm  6.14.13
node 12.14.1 x64
atom 1.63.0-dev
python 3.10.8
git 2.38.1
Installing modules ✓
Wrote Dependencies Fingerprint: /home/jieiku/.installs/atom/node_modules/.dependencies-fingerprint 3c0cbbf60660364fe1577ac78314749e9d6d2393
Copying assets to /home/jieiku/.installs/atom/out/app
Transpiling packages with custom transpiler configurations in /home/jieiku/.installs/atom/out/app
 transpiling for package github
Installing modules ✓
Transpiling Babel paths in /home/jieiku/.installs/atom/out/app
Transpiling CoffeeScript paths in /home/jieiku/.installs/atom/out/app
Transpiling CSON paths in /home/jieiku/.installs/atom/out/app
Transpiling PEG.js paths in /home/jieiku/.installs/atom/out/app
Generating module cache for /home/jieiku/.installs/atom/out/app
Generating pre-built less cache in /home/jieiku/.installs/atom/out/app/less-compile-cache
Generating metadata for /home/jieiku/.installs/atom/out/app/package.json
Generating API docs at /home/jieiku/.installs/atom/docs/output/atom-api.json
Dumping symbols in /home/jieiku/.installs/atom/out/symbols
(node:93067) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/jieiku/.installs/atom/out/app/node_modules/scandal/node_modules/isbinaryfile/package.json' of './lib/panino.js'. Please either fix that or report it to the module author
(Use `node --trace-deprecation ...` to show where the warning was created)
/home/jieiku/.installs/atom/script/lib/dump-symbols.js:33
        throw new Error(error);
        ^

[Error: Error
  at /home/jieiku/.installs/atom/script/lib/dump-symbols.js:33:15
  at ChildProcess.<anonymous> (/home/jieiku/.installs/atom/script/node_modules/minidump/lib/minidump.js:27:7)
  at ChildProcess.emit (node:events:513:28)
  at maybeClose (node:internal/child_process:1100:16)
  at Socket.<anonymous> (node:internal/child_process:458:11)
  at Socket.emit (node:events:513:28)
  at Pipe.<anonymous> (node:net:301:12)
]

@Jieiku try with this change on the atom main repository lunar-editor/lunar@5bb6d64

Hi @Jieiku.

Issue 1, fetching atom.io URLs is unreliable

For the atom.io URLs, yes, the atom.io server is known to be flaky for several months now. I could have sworn that was fixed here, but I guess not,

The atom.io URLs can be replaced with github.com URLs.

If you do curl -L --verbose https://www.atom.io/api/packages/autocomplete-atom-api/versions/0.10.7/tarball, for example, (and you are lucky enough to not get a 500 internal server error from the atom.io server!), you can see it redirects to here: https://codeload.github.com/atom/autocomplete-atom-api/legacy.tar.gz/refs/tags/v0.10.7.

You can replace the atom.io URL with this codeload.github.com URL, or something equivalent like this: https://github.com/atom/autocomplete-atom-api/tarball/v0.10.7 (old way), or this https://github.com/atom/autocomplete-atom-api/archive/v0.10.7.tar.gz (new way) if you prefer (it ultimately redirects to the same codeload.github.com URL).

In short, change atom.io package URLs to fetch from GitHub.com instead. See above for details.

Issue 2, symbol dumping is error prone

This gives me issues from time to time as well. I don't use the native code debug symbols personally... If you don't need them, you an comment out or otherwise disable the symbol dumping part of script/build. The patch the commenter above posted works. Or you can comment out the dumpSymbols() function in script/build entirely.

await dumpSymbols();

In short, disable symbol dumping if you don't need the native code debug symbols for various bundled/core packages.

FWIW, the AUR is not made by people at this repo, and it is untested by maintainers here. Some effort is made to troubleshoot with people, but it's not 100% top priority, and I think the AUR is not in great shape last I heard (which was several months ago). It could be better now, I guess? (Not having looked at it myself.)

appreciate the help guys, got atom installed now :)