andischerer / atom-svn

SVN integration for atom text editor
MIT License
34 stars 7 forks source link

Crashes in Atom v1.7.0-beta: Cannot read property 'onDidChangeStatus' of undefined #20

Open Arcanemagus opened 8 years ago

Arcanemagus commented 8 years ago

[Enter steps to reproduce below:]

  1. Enable this package in Atom v1.7.0-beta0
  2. Open a project that uses SVN as it's VCS

Atom Version: 1.7.0-beta0 System: Microsoft Windows 10 Enterprise Thrown From: svn package, v0.0.9

Stack Trace

Failed to activate the svn package

At Cannot read property 'onDidChangeStatus' of undefined

TypeError: Cannot read property 'onDidChangeStatus' of undefined
    at status-bar-git.GitView.subscribeToRepositories (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\node_modules\status-bar\lib\git-view.js:99:52)
    at C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\node_modules\status-bar\lib\git-view.js:31:24
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at Project.module.exports.Project.setPaths (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\project.js:225:27)
    at C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\project.js:364:19
    at Provider.module.exports.Provider.provide (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\node_modules\service-hub\lib\provider.js:30:52)
    at ServiceHub.module.exports.ServiceHub.provide (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\node_modules\service-hub\lib\service-hub.js:30:20)
    at Package.module.exports.Package.activateServices (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\package.js:352:71)
    at Package.module.exports.Package.activateNow (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\package.js:186:16)
    at C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\package.js:156:32
    at Package.module.exports.Package.measure (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\package.js:92:15)
    at C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\package.js:149:26
    at Package.module.exports.Package.activate (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\package.js:146:34)
    at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\package-manager.js:535:21)
    at C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\package-manager.js:342:19
    at C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\config.js:631:20
    at Function.module.exports.Emitter.simpleDispatch (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at Config.module.exports.Config.emitChangeEvent (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\config.js:816:29)
    at Config.module.exports.Config.setRawValue (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\config.js:608:19)
    at Config.module.exports.Config.set (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\config.js:227:14)
    at Config.module.exports.Config.removeAtKeyPath (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\config.js:377:12)
    at Package.module.exports.Package.enable (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\package.js:77:26)
    at PackageManager.module.exports.PackageManager.enablePackage (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\src\package-manager.js:169:14)
    at HTMLButtonElement.<anonymous> (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\node_modules\settings-view\lib\package-card.js:327:27)
    at HTMLButtonElement.jQuery.event.dispatch (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\node_modules\jquery\dist\jquery.js:4435:9)
    at HTMLButtonElement.elemData.handle (C:\Users\Landon Abney\AppData\Local\atom\app-1.7.0-beta0\resources\app.asar\node_modules\jquery\dist\jquery.js:4121:28)

Commands

Config

{
  "core": {
    "disabledPackages": [
      ".bin",
      "fast-eslint",
      "linter-flow",
      "atom-typescript",
      "markdown-preview-plus",
      "git-control",
      "git-history",
      "linter-gjslint",
      "language-markdown",
      "linter-tidy",
      "language-chef",
      "linter-csslint",
      "linter-bootlint",
      "linter-scss-lint",
      "linter-jscs"
    ],
    "themes": [
      "seti-ui",
      "seti-syntax"
    ]
  }
}

Installed Packages

# User
atom-autocomplete-php, v0.18.7
autocomplete-python, v1.7.0
docblockr, v0.7.3
editorconfig, v1.2.4
file-watcher, v0.4.0
highlight-selected, v0.11.2
language-docker, v1.1.6
language-elixir, v0.12.3
language-haml, v0.23.15
language-ini, v1.14.0
language-powershell, v2.1.0
language-r, v0.4.0
language-reg, v0.0.0
linter, v1.11.3
linter-alex, v2.0.0
linter-coffeelint, v1.1.2
linter-docker, v0.1.2
linter-elixirc, v1.1.5
linter-erb, v1.0.2
linter-eslint, v7.1.1
linter-flake8, v1.13.0
linter-foodcritic, v0.5.2
linter-golinter, v1.2.0
linter-haml, v1.2.0
linter-htmlhint, v1.1.0
linter-javac, v1.8.1
linter-js-yaml, v1.2.5
linter-jshint, v2.0.3
linter-jsonlint, v1.2.1
linter-lintr, v1.0.4
linter-lua, v1.0.1
linter-markdown, v1.5.0
linter-pep8, v1.2.1
linter-perl, v0.7.2
linter-perlcritic, v0.3.3
linter-php, v1.2.0
linter-phpcs, v1.3.1
linter-phpmd, v1.4.1
linter-pylint, v1.2.0
linter-rails-best-practices, v0.2.2
linter-reek, v2.1.5
linter-rubocop, v0.4.7
linter-ruby, v1.2.2
linter-stylelint, v2.0.1
linter-tslint, v0.8.3
linter-ui-default, v0.0.2
mapfile-grammar, v0.1.0
minimap, v4.21.0
minimap-find-and-replace, v4.5.0
minimap-git-diff, v4.2.0
minimap-highlight-selected, v4.4.0
minimap-linter, v1.1.1
minimap-selection, v4.4.0
pigments, v0.24.5
seti-syntax, v0.4.1
seti-ui, v0.9.1
svn, v0.0.9
tab-control, v0.6.9
trailing-spaces, v0.3.2

# Dev
No dev packages
andischerer commented 8 years ago

I think next week i'll have some time for investigating. Until then i suggest using atom stable.

Arcanemagus commented 8 years ago

Confirmed that this only shows when opening a project that uses SVN as its VCS btw.

andischerer commented 8 years ago

Since v1.7 atom introduces and requires a new async repository class which has to be implemented by this package. ref #2 See https://github.com/atom/atom/blob/39592599b1f577a0d395a088ecea3293d159097d/src/git-repository-async.js

derwaldgeist commented 8 years ago

Since today, I'm also having this issue with the stable Atom release. svn does not show changes in my source code any more, only in the treeview. Maybe this is related to the latest release of the statusbar package?

derwaldgeist commented 8 years ago

Ok, found out that this is related to Atom automatically updating to release 1.7 which has been released today. What can I do to fix this?

fabricevidal commented 8 years ago

Same here... svn worked well until atom 1.6.2. Now broken in 1.7.0

derwaldgeist commented 8 years ago

Is there any way to revert Atom to 1.6.2 until this is fixed? Not having code diff highlights is a huge drawback.

fabricevidal commented 8 years ago

the 1.6.2 package is here https://github.com/atom/atom/releases/tag/v1.6.2 . However I do not know how to disable the autoupdate feature...

fabricevidal commented 8 years ago

Arf found it... in the core settings :-)

derwaldgeist commented 8 years ago

Yup, I also found out how to downgrade and prevent auto-updates now. But it would be great if the svn package could be adapted to 1.7 soon. Still, I don't understand why the Atom team introduces such breaking changes in a minor release. Obviously, they're not using semver.

eviljoe commented 8 years ago

This is the commit that broke the svn package: https://github.com/atom/status-bar/pull/114/commits/aa4c4fe3e9444d14973bbb69e41ca593895e507a. It is part of the move to async git: https://github.com/atom/atom/pull/9213.

The status bar is looking for an async field on the SvnRepository object. For the GitRepository class, that object is an instance of GitRepositoryAsync

To keep up with the new "API," it seems like each of the functions in the SvnRepository class will have to be replicated on a new class, SvnRepositoryAsync. Each of the getter functions (or maybe all functions) in SvnRepositoryAsync will have to return a promise that resolves to the requested value.

andischerer commented 8 years ago

Should be fixed in v0.0.10. Many Thanks to @awestroke

derwaldgeist commented 8 years ago

Great to hear! Thanks a lot for fixing this. Now I can finally update my Atom :-)

joaofl commented 8 years ago

Same happening here, running version 1.8 Was it supposed to be fixed already?

Linux mint 18, based on Ubuntu 16.04

screenshot from 2016-07-19 21-45-54

benletchford commented 8 years ago

Happening to me also - running Ubuntu 14.04 and Atom 1.8.

AshBT commented 8 years ago

Yeah. Me too. It started after I did a Ctrl-Alt+R reload.

joaofl commented 8 years ago

@andischerer I would suggest you to open it again then...

0rvar commented 7 years ago

Anyone still experiencing this problem?