Upgrade to Pro — share decks privately, control downloads, hide ads and more …

初めてのOSSコントリビュートに挑戦したら、既に該当機能が存在していた件について

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for kero kero kero kero
December 15, 2023
58

 初めてのOSSコントリビュートに挑戦したら、既に該当機能が存在していた件について

20231215

Avatar for kero kero

kero kero

December 15, 2023
Tweet

Transcript

  1. 初めての OSSコントリビュート に挑戦したら、
 既に 該当機能 が 存在 していた件について
 
 2023/12/15


    
 (株)インフィニットループ 
 サーバーサイドエンジニア kerokero

  2. 22卒 自称青魔道士系エンジニア 
 (株)インフィニットループ 
 kerokero ・北海道の 札幌 生まれ、札幌 育ち
 ・水産→数学(非情報系)→2022年4月にIL入社

      ・最近の趣味は 絵を描く ことと ストリートファイター6 です
 ・担当領域は サーバーサイドのアプリ・インフラ実装(PHP, AWSなど) です 

  3. 具体的には……
 Illuminate/Support/Collection の get メソッドを使っている部分 が大量に通らなくなってしまった ‼
 
 ERROR: PossiblyNullPropertyFetch

    - app/Services/Queries/Weapon/WeaponQuery.php:87:19 
 - Cannot get property on possibly null variable $masterWeapon of type mixed|null (see https://psalm.dev/082)
 ? $masterWeapon->id
 $masterWeapon = $mstWeaponsByMaterial Count->get($masterByMaterial->materialCount); 
 psalm/plugin-laravel (v2.8.0) 

  4. 具体的には……
 Illuminate/Support/Collection の get メソッドを使っている部分 が大量に通らなくなってしまった ‼
 
 ERROR: PossiblyNullPropertyFetch

    - app/Services/Queries/Weapon/WeaponQuery.php:87:19 
 - Cannot get property on possibly null variable $masterWeapon of type mixed|null (see https://psalm.dev/082)
 ? $masterWeapon->id
 $masterWeapon = $mstWeaponsByMaterialCount->get($masterByMaterial->materialCount); 
 psalm/plugin-laravel (v2.8.0) 

  5. - Cannot get property on possibly null variable $masterWeapon of

    type mixed|null (see https://psalm.dev/082)
 nullが入る可能性があるよって言われてる

  6. - Cannot get property on possibly null variable $masterWeapon of

    type mixed|null (see https://psalm.dev/082)
 nullが入る可能性があるよって言われてる
 null って mixed に含まれてるんじゃないの?  >
  7. Laravel の場合は公式が Contribution Guide というものを出してる
 ・https://laravel.com/docs/10.x/contributions
 
 ・ブランチの切り方や、コーディングスタイルの指定などがある
 
 ・resources/css

    や resources/js など、他のコンパイル済みファイルに影響を与え るものに関しては、メンテナが別途生成しコミットする     などなど
  8. Conventional Commits とは
 ・https://www.conventionalcommits.org/en/v1.0.0/
 
 ・Conventional Commits というのは、コミットメッセージ上の規約のこと 
 


    ・feat(lang): add Polish language みたいなやつ
 
 ・セマンティック バージョニング に対応しており、自動化しやすい 
 
 
 

  9. Conventional Commits とは
 ・https://www.conventionalcommits.org/en/v1.0.0/
 
 ・Conventional Commits というのは、コミットメッセージ上の規約のこと 
 


    ・feat(lang): add Polish language みたいなやつ
 
 ・セマンティック バージョニング に対応しており、自動化しやすい 
 ・多くのOSSではConventional Commitsのやり方を取り入れている