GithubHelp home page GithubHelp logo

atom-utils's People

Contributors

abe33 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

atom-utils's Issues

Doesn't resolve promise if a package has deferred activation

If a package you're trying to load has activationEvents defined in its package.json, activation will be deferred and the promise returned from atom.packages.activatePackage will never resolve.

I think this can be gotten around by calling package.activateNow() instead of activating through the package manager but I'm not sure if it'll work properly.

TypeError: atom.packages.activatePackage(...).then(...).fail is not a function

Reproduction

  1. Build latest version of Atom
  2. Install tree-view-breadcrumb: apm install tree-view-breadcrumb
  3. Load Atom, error is logged in the terminal, but there's no error notification (atom.notifications.addError) in the top right corner of Atom's window.

System details

  • Atom 1.2.0-dev-fdbe65b (built from source)
  • Debian 9

Stack trace

TypeError: atom.packages.activatePackage(...).then(...).fail is not a function
  at /home/olmo/.atom/packages/tree-view-breadcrumb/node_modules/atom-utils/lib/atom-utils.js:27:14
  at Array.forEach (native)
  at module.exports.requirePackages (/home/olmo/.atom/packages/tree-view-breadcrumb/node_modules/atom-utils/lib/atom-utils.js:23:25)
  at module.exports.requirePackages (/home/olmo/.atom/packages/tree-view-breadcrumb/node_modules/atom-utils/lib/atom-utils.js:8:14)
  at Object.module.exports.activate (/home/olmo/.atom/packages/tree-view-breadcrumb/lib/tree-view-breadcrumb.coffee:34:5)
  at Package.module.exports.Package.activateNow (/usr/local/share/atom/resources/app.asar/src/package.js:246:19)
  at /usr/local/share/atom/resources/app.asar/src/package.js:226:32
  at Package.module.exports.Package.measure (/usr/local/share/atom/resources/app.asar/src/package.js:167:15)
  at /usr/local/share/atom/resources/app.asar/src/package.js:219:26
  at Package.module.exports.Package.activate (/usr/local/share/atom/resources/app.asar/src/package.js:215:34)
  at PackageManager.module.exports.PackageManager.activatePackage (/usr/local/share/atom/resources/app.asar/src/package-manager.js:484:21)
  at /usr/local/share/atom/resources/app.asar/src/package-manager.js:467:29
  at Config.module.exports.Config.transact (/usr/local/share/atom/resources/app.asar/src/config.js:324:16)
  at PackageManager.module.exports.PackageManager.activatePackages (/usr/local/share/atom/resources/app.asar/src/package-manager.js:462:19)
  at PackageManager.module.exports.PackageManager.activate (/usr/local/share/atom/resources/app.asar/src/package-manager.js:443:46)
  at Atom.module.exports.Atom.startEditorWindow (/usr/local/share/atom/resources/app.asar/src/atom.js:657:21)
  at Object.<anonymous> (/usr/local/share/atom/resources/app.asar/src/window-bootstrap.js:12:8)
  at Object.<anonymous> (/usr/local/share/atom/resources/app.asar/src/window-bootstrap.js:23:4)
  at Module._compile (module.js:428:26)
  at Object.keys.forEach.Object.defineProperty.value [as .js] (/usr/local/share/atom/resources/app.asar/src/compile-cache.js:169:21)
  at Module.load (module.js:353:32)
  at Function.Module._load (module.js:308:12)
  at Module.require (module.js:363:17)
  at require (module.js:382:17)
  at setupWindow (file:///usr/local/share/atom/resources/app.asar/static/index.js:82:25)
  at window.onload (file:///usr/local/share/atom/resources/app.asar/static/index.js:35:9)

I think the error should be fixed if you use Promise::catch instead of Promise::fail

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.