Skip to content

Instantly share code, notes, and snippets.

@jules2689
Last active October 4, 2017 22:32
Show Gist options
  • Save jules2689/dfe9d9e91b7d9c05205f0355b3e45dbd to your computer and use it in GitHub Desktop.
Save jules2689/dfe9d9e91b7d9c05205f0355b3e45dbd to your computer and use it in GitHub Desktop.

My Presentation: http://rubykaigi.org/2017/presentations/jules2689.html

Bundler 2.0 Notes

Presentation: http://rubykaigi.org/2017/presentations/0xColby.html

  • bundle add command
    • This can be used to add gems to a gem file programmatically. Might be useful in SDB for adding things like metrics and cloud gems
  • bundle plugin command
    • Can add custom bundle commands. For example we could add bundle bootsnap clear for bootsnap cache resetting.
  • Recommended to upgrade to 1.16 before bundler 2
  • Capistrano bundler is gone, use gem.
  • No more shortcuts In Gemfile (i.e. github source, etc). Only git, source, path.
  • bundle show command is gone
    • Bundle info/list instead of show
  • Bundle install command drops with, without, path, arguments.... need to use config instead because most use cases is in CI and production
  • Bundle package becomes bundle cache
  • Global gem and extension cache ->> so we can share extensions between versions and gem source is kept around in a cache
  • OS version is added to the Gemfile.lock in Bundler 2, this helps with indexing. We will need to migrate Gemfiles over as needed (with Darwin and linux). This will affect deploys

Ruby Community

The Ruby community is very segregated.

Japanese developers are often unaware of progress made in English communities and presumably vice versa. In one presentation someone mentioned Rubycop and a number of Japanese developers were unaware of the tool. Upon closer inspection, it is obvious that rubocop has only English documentation. The same goes for Bundler and other tools like Bootsnap.

Ruby on Rails is a notable exception - there is a lot of translated docs. This provides a good intro for Japanese developers

The core Ruby team is made up of almost entirely Japanese developers, and the few that aren't Japanese have learned the Japanese language. This means that much of the Ruby Issue/Bug tracker and much of the roadmap are in Japanese.

I'd like to start with translating the Bootsnap README into Japanese.

Type Checking and Gradual Typing

This was a very hot topic in the confernece. Other than at least 2 talks on typing, the Ruby core committers spoke about it in length during the Ruby Core AMA.

The Ruby Core teams are very split about how to implement (or if we should implement) the type system. Matz does want to implement it. The video recording is here (Japanese Only): http://rubykaigi.org/2017/presentations/rubylangorg.html

The team is split upon how annotations should be written: some think we should be using Scala-esque typing. e.g.

def my_method(param)
end

becomes

def my_method(param: Hash) -> Hash
end

Other team members think we can use comments:

# (param: Hash) -> Hash
def my_method(param)
end

There were 3 other presentations that talked about type systems.

From those conversations the notable takeaways were:

  • Github has a project called typedruby. It is headed by Charlie Somerville. The system is private right now, but I am a collaborator on it. It works with the "proper" annotations, a Flow-esque static checker, and a modified MRI to ignore the added annotations
  • https://github.com/kddeisz/vernacular allows modifying the AST, we may be able to use this instead of MRI changes
  • https://github.com/soutaro/steep is a gem that adds gradual typing using the "proper" annotations
  • Can use a type contract generation from Tests. Makes things about 20x slower. RubyMine stuff OSSed

Other

@shushugah
Copy link

Thanks for the notes! Small typo, Rubycop should be Rubocop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment