- ã³ã³ããã¹ã
- æ§æ
- æé
- ã¢ã³ãã¼ãããrbsã使ãã¡ãªãã
- æå¾ã«
- 2024/12/05 20:27追è¨
ã³ã³ããã¹ã
åãç´è¿2ã3年以å ã«æ°ããä½ã£ãgemã§ã¯å ¨ã¦rbsã¨steepãå°å ¥ãã¦ã¬ãããªåãæ¸ãã¦ãã¾ãã
ãããèªåã®gemã®rbsã¯æ¸ãã¦ããèªåã®gemãä¾åãã¦ããrubyã®æ¨æºã©ã¤ãã©ãªã®ã¡ã½ãããä¾åãã¦ããå¥ã®gemã®æ¹ã§åå®ç¾©ããªãã£ãã足ãã¦ããªãã£ããã㦠steep check
ãéããªãã¦å°ããã¨ãããããã¾ãã
ããããæã«ã¯ https://github.com/ruby/gem_rbs_collection ã https://github.com/ruby/rbs ã«ããããéãã°ãããã§ãããã¨ã¯ããæ¬å®¶ã«åãè¾¼ã¾ããã¾ã§èªåã®gemã®éçºãæ¢ã¾ãã®ã¯ã¤ããã®ã§forkçã使ããã¨ãå¤ãã§ãããã
ããã足ããªãåå®ç¾©ãå¤ãã£ãæã«forkçãã¡ã³ãããã®ãã¤ããæ°ããã¦ããã®ã§*1åã¯ã¢ã³ãã¼ãããã¨ãã¦rbsãå ¥ããããã«ãã¦ãã¾ãã
ãããããã¨ã¯å¤åèªåãããã£ã¦ããªãã ãããªãã¨æãã¤ã¤ãä»ã®äººãã©ããã£ã¦ããç¥ãããã®ã§èªåãæ®æ®µãã£ã¦ããã¨ãç´¹ä»ãã¦ã¿ã¾ãã
æ§æ
ä¸è¨ã®ããã« sig/non-gemify/
ã®ãããªãã£ã¬ã¯ããªãä½ã£ã¦ãããã«ã¢ã³ãã¼ãããrbsãå
¥ãã¦ãã¾ãã
$ tree sig/ sig/ âââ non-gemify â  âââ io.rbs â  âââ kernel.rbs âââ ruby_header_parser â  âââ argument_definition.rbs â  âââ config.rbs â  âââ enum_definition.rbs â  âââ function_definition.rbs â  âââ parser.rbs â  âââ struct_definition.rbs â  âââ type_definition.rbs â  âââ typeref_definition.rbs â  âââ util.rbs âââ ruby_header_parser.rbs 3 directories, 12 files
sig-non-gemify/
ã®ããã«ãã¦ãããããã§ãã好ã¿ã®åé¡ãã¨æãã¾ãã
ã¨ãã£ã¿ãIDEã«ãã£ã¦ã¯ sig/
以å¤ã®ãã£ã¬ã¯ããªãèªèããªãã¦å°ããã¨ããªãã¨ãªãã¨ã¹ãã¼ã㦠sig/
ã®ä¸ã«ãµããã£ã¬ã¯ããªãä½ãæ¹æ³ã«ãã¾ãããï¼ææããï¼
æé
ã¢ã³ãã¼ãããrbsãgemãã¡ã¤ã«ã«å«ã㦠https://rubygems.org/ ã§é å¸ãè¡ãã¨ããã®gemãã¤ã³ã¹ãã¼ã«ããã¦ã¼ã¶ã®éçºç°å¢ã«æªå½±é¿ãèµ·ããããããã¾ããã
ãã®ãããgemspecã§ä¸è¨ã®ããã«é¤å¤è¨å®ãå ¥ããæ¹ãããã§ãã
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls| ls.readlines("\x0", chomp: true).reject do |f| (f == gemspec) || - f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile]) + f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile sig/non-gemify]) end end
ãã¨ã¯sig-non-gemify/
ã®ããã« sig/
ãã£ã¬ã¯ããªã®å¤ã«ç½®ãããã«ããå ´åã«ã¯ä¸è¨ã®ããã« Steepfile
ã«è¨å®è¿½å ãå¿
è¦ã ã¨æãã¾ãã
target :lib do
signature "sig"
+ signature "sig-non-gemify"
ã¢ã³ãã¼ãããrbsãå®å
¨ã«ãªããªã£ãæã« Steepfile
ã«åå¨ããªããã£ã¬ã¯ããªãæ¸ããæã«ã¨ã©ã¼ã«ãªããªãããæ°ã«ãªã£ããã§ãããä»ã®steepã®ææ°çï¼1.8.3ï¼ã ã¨åé¡ãªãã£ãã§ãã
ã¢ã³ãã¼ãããrbsã使ãã¡ãªãã
- æ¬å®¶ã®gem_rbs_collectionãä½µç¨ã§ããã®ã§å¸¸ã«ææ°ã使ãç¶ãããã¨ãã§ãã
- æ¬å®¶ã«æããããããåãè¾¼ã¾ããæã«èªåã®gemã§ã¯ãã®ã¢ã³ãã¼ãããrbsã ããæ¶ãã ãã§ãã
- ä¸æ°ã«åãè¾¼ã¾ããã¨ã¯éããªãã®ã§ãã¼ã¸ããããã®ãã段éçã«ã¢ã³ãã¼ãããrbsãæ¶ããã¨ãã§ãã
åã以årbsã«åºããããããåãè¾¼ã¾ãã¦ãªãªã¼ã¹ããã¦ããããã§èªåã®gemã«å ¥ãã¦ãã¢ã³ãã¼ãããrbsãã¾ã1ã¤æ¶ããããã«ãªã£ãhttps://t.co/KdHMjQDXKyhttps://t.co/VFfCMg90gO
— sue445 (@sue445) 2024å¹´12æ5æ¥
æå¾ã«
ã¿ããªã®geméçºæã®ãã®æã®å°ããã¨ã®è§£æ±ºæ¹æ³ãç¥ãããã®ã§æãã¦ãã ããï¼ï¼ï¼
2024/12/05 20:27追è¨
ruby-jp slackã§èããã
sig/gems/ ã£ã¦ãã£ã¬ã¯ããªã«ããããæ¾ãè¾¼ãã§ã¾ãããåãè¾¼ã¾ããå¾ã«ãæé¤ãã¦ã¾ãã
ã¨ã®ãã¨ã ã£ãããããªãã¾ããã...
*1:å®éã«ããããéç¨ã¯ãããã¨ãªãã®ã§ããã¾ã§æ³å