Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSS Gate Workshop: Tokyo: 2018-09-08: saori-morishima: atom-git-control: Work log #945

Closed
saori-morishima opened this issue Sep 8, 2018 · 10 comments

Comments

@saori-morishima
Copy link
Contributor

This is a work log of a "OSS Gate workshop".
"OSS Gate workshop" is an activity to increase OSS developers.
Here's been discussed in Japanese. Thanks.

作業ログ作成時の説明

以下のテンプレートを埋めてタイトルに設定します。埋め方例はスクロールすると見えてきます。

OSS Gate Workshop: ${LOCATION}: ${YEAR}-${MONTH}-${DAY}: ${ACCOUNT_NAME}: ${OSS_NAME}: Work log

タイトル例↓:

OSS Gate Workshop: Tokyo: 2017-01-16: kou: Rabbit: Work log

OSS Gateワークショップ関連情報

  • スライド:ワークショップの進行に使っているスライドがあります。
  • チャット:OSS開発に関することならなんでも相談できます。ワークショップが終わった後もオンラインで相談しながら継続的にOSSの開発に参加しましょう!
  • シナリオ:ワークショップの目的・内容・進め方の詳細が書いています。
  • 過去のビギナーの作業ログ:他の人の作業ログから学べることがいろいろあるはずです。
@BuiThiLuongDuyen-zz
Copy link
Contributor

宜しくお願いします!

@mukaken
Copy link

mukaken commented Sep 8, 2018

mukakenです。よろしくお願いします。

@saori-morishima
Copy link
Contributor Author

Atom起動→パッケージ→Settings View→Install Packages/Themes

パッケージのインストール画面が出た
git-controlを検索フォームに入れたらgit-control 0.9.0が出てきたのでインストールボタンをクリック
インストールされた

ツールバーのパッケージをクリックしてもgit-controlがない
よく見たらPackagesの大項目がツールバーに増えていて,そこの中にgit-controlが入っていた(´・ω・`)

Packages→git-control→Toggleをクリックしたら,下記のエラーが出てきた
image

@saori-morishima
Copy link
Contributor Author

エラー詳細

TypeError: Cannot read property 'split' of undefined
    at GitControlView.module.exports.GitControlView.initialize (file:///C:/Users/Saori/.atom/packages/git-control/lib/git-control-view.coffee:76:50)
    at GitControlView.View [as constructor] (C:\Users\Saori\.atom\packages\atom-runner\node_modules\space-pen\lib\space-pen.js:184:25)
    at new GitControlView (file:///C:/Users/Saori/.atom/packages/git-control/lib/git-control-view.coffee:36:7)
    at Object.toggleView (file:///C:/Users/Saori/.atom/packages/git-control/lib/git-control.coffee:31:14)
    at HTMLElement.<anonymous> (file:///C:/Users/Saori/.atom/packages/git-control/lib/git-control.coffee:18:57)
    at CommandRegistry.handleCommandEvent (C:\Users\Saori\AppData\Local\atom\app-1.26.1\resources\app\src\command-registry.js:384:49)
    at CommandRegistry.dispatch (C:\Users\Saori\AppData\Local\atom\app-1.26.1\resources\app\src\command-registry.js:273:23)
    at AtomEnvironment.dispatchApplicationMenuCommand (C:\Users\Saori\AppData\Local\atom\app-1.26.1\resources\app\src\atom-environment.js:1347:25)
    at EventEmitter.outerCallback (C:\Users\Saori\AppData\Local\atom\app-1.26.1\resources\app\src\application-delegate.js:339:53)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:197:7)

@saori-morishima
Copy link
Contributor Author

saori-morishima commented Sep 8, 2018

さっきのErrorメッセージ下部にあるView Issueボタンをクリックして
参照するとAtomのバージョンを上げることで,修正が入っているらしいのでバージョンを上げる

ヘルプ→Restarting Install and Updateみたいなやつをクリック
Atomが終了したが,自動で起動しないので,起動しなおした

git-controlがツールバーのパッケージの中に移動した
Toggleをクリックしたら再び同等のエラーが出た.

Atomのバージョン1.26.1→1.30.0

TypeError: Cannot read property 'split' of undefined
    at GitControlView.module.exports.GitControlView.initialize (file:///C:/Users/Saori/.atom/packages/git-control/lib/git-control-view.coffee:76:50)
    at GitControlView.View [as constructor] (C:\Users\Saori\.atom\packages\git-control\node_modules\space-pen\lib\space-pen.js:184:25)
    at new GitControlView (file:///C:/Users/Saori/.atom/packages/git-control/lib/git-control-view.coffee:36:7)
    at Object.toggleView (file:///C:/Users/Saori/.atom/packages/git-control/lib/git-control.coffee:31:14)
    at HTMLElement.<anonymous> (file:///C:/Users/Saori/.atom/packages/git-control/lib/git-control.coffee:18:57)
    at CommandRegistry.handleCommandEvent (C:\Users\Saori\AppData\Local\atom\app-1.30.0\resources\app\src\command-registry.js:384:49)
    at CommandRegistry.dispatch (C:\Users\Saori\AppData\Local\atom\app-1.30.0\resources\app\src\command-registry.js:273:23)
    at AtomEnvironment.dispatchApplicationMenuCommand (C:\Users\Saori\AppData\Local\atom\app-1.30.0\resources\app\src\atom-environment.js:1351:25)
    at EventEmitter.outerCallback (C:\Users\Saori\AppData\Local\atom\app-1.30.0\resources\app\src\application-delegate.js:339:53)
    at emitThree (events.js:136:13)
    at EventEmitter.emit (events.js:217:7)

@saori-morishima
Copy link
Contributor Author

Issueに書いてあったように

 go to ~/.atom/packages/git-control/lib and open git-control-view.coffee. Scroll down to line 76, remove what's already there, and paste this:
if git.getRepository().path @setWorkspaceTitle(git.getRepository().path.split('/').reverse()[1]) else @setWorkspaceTitle(git.getRepository().repo.workingDirectory.split('/').reverse()[0])

を実施した.
Atomを再起動した後,パッケージ→git-control→Toggle
でGUIが無事に起動した.\(^o^)/

@saori-morishima
Copy link
Contributor Author

ためしにProjectボタンをクリック→Errorが出た

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at Object.resolve (path.js:221:7)
    at fn (file:///C:/Users/Saori/.atom/packages/git-control/lib/dialogs/project-dialog.coffee:33:44)
    at ProjectDialog.module.exports.ProjectDialog.activate (file:///C:/Users/Saori/.atom/packages/git-control/lib/dialogs/project-dialog.coffee:28:5)
    at GitControlView.module.exports.GitControlView.projectMenuClick (file:///C:/Users/Saori/.atom/packages/git-control/lib/git-control-view.coffee:150:20)
    at MenuView.module.exports.MenuView.click (file:///C:/Users/Saori/.atom/packages/git-control/lib/views/menu-view.coffee:50:7)
    at MenuItem.click (file:///C:/Users/Saori/.atom/packages/git-control/lib/views/menu-view.coffee:39:17)
    at HTMLDivElement.<anonymous> (C:\Users\Saori\.atom\packages\git-control\node_modules\space-pen\lib\space-pen.js:231:38)
    at HTMLDivElement.dispatch (C:\Users\Saori\.atom\packages\git-control\node_modules\jquery\dist\jquery.js:4435:9)
    at HTMLDivElement.elemData.handle (C:\Users\Saori\.atom\packages\git-control\node_modules\jquery\dist\jquery.js:4121:28)

Issueがすでに上がっているので,その通りに対処.

try to change str 135 in .atom/packages/git-control/lib/git.coffee to
return fs.existsSync(path.join(repo.repo.workingDirectory, 'MERGE_HEAD'))

具体的には l.135のreturn fs.existsSync(path.join(repo.path, 'MERGE_HEAD'))を
         return fs.existsSync(path.join(repo.repo.workingDirectory, 'MERGE_HEAD'))に修正
Atomを再起動して,Projectボタンをクリック
同じエラーが出る

ちゃんとIssueを読んでなかった

If you need to solve this manual, because my pull was not accepted right now - just copy a few lines into your file under .atom\packages\git-control\lib\dialogs\project-dialog.coffee
from:
github: atom-git-control/pull/250/files

マニュアルで対処したら解決した.
このままだと,たぶん全体的に同じ原因のエラーが出る.

git-controlからいったんcloneしようと思ったが,cloneする機能は実装されていない
https://atom.io/packages/git-control
にもたしかに言及されてないが,Projectからできそうな気もするので戸惑った
明示されているとよい?

@saori-morishima
Copy link
Contributor Author

Issueを投げる前になどを調べると良い

  • 公式のプロジェクトはどこか
  • アクティブなブランチで自分が詰まった部分の修正がすでに入っているのか
  • アクティブなプロジェクトのほうが,リリースする意思はあるのか(個人で使うために直しているだけかもしれない)
  • Packageのリリース方法について,作者が作ったパッケージを登録する形であれば,登録しているのかどうか(後継になるつもり?があるかどうか)

@saori-morishima
Copy link
Contributor Author

I'm not familiar with this project but I installed this in order to use git client.

I faced the 'Uncaught TypeError: Cannot read property 'split' of undefined' twice in different process ( issue 248 259). However the problem was fixed when I use jakubzet/atom-git-control branch.
But we cannot find the fixed package from the package manager of Atom.

Do you have any plan to merge the fixed branch?
もしメンテナンスに時間ないならリードしてと書こうとしたが,
後継のプロジェクトっぽく見えるほうが,Issueを公開していない.→公開するつもりがなさそう?

259はすでにPRが投げられているので,進展はありますか?のコメントを残した
248は修正方法は書いてあるがPRが投げられていないので,PRを投げるのがよさそう

@tdtds
Copy link
Member

tdtds commented Oct 27, 2018

次のワークショップが始まるのでいったんクローズしますね。

@tdtds tdtds closed this as completed Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants