Remove dependencies on Linguist
This saves about 128 MB of baseline RAM usage per Unicorn and Sidekiq process (!). Linguist wasn't detecting languages anymore from CE/EE since 9ae8b574. However, Linguist::BlobHelper was still being depended on by BlobLike and others. This removes the Linguist gem, given it isn't required anymore. EscapeUtils were pulled in as dependency, but given Banzai depends on it, it is now added explicitly. Previously, Linguist was used to detect the best ACE mode. Instead, we rely on ACE to guess the best mode based on the file extension.
显示
- Gemfile 1 个添加, 3 个删除Gemfile
- Gemfile.lock 2 个添加, 7 个删除Gemfile.lock
- Gemfile.rails5.lock 2 个添加, 7 个删除Gemfile.rails5.lock
- app/assets/javascripts/blob_edit/blob_bundle.js 2 个添加, 2 个删除app/assets/javascripts/blob_edit/blob_bundle.js
- app/assets/javascripts/blob_edit/edit_blob.js 5 个添加, 3 个删除app/assets/javascripts/blob_edit/edit_blob.js
- app/assets/javascripts/lib/ace.js 1 个添加, 0 个删除app/assets/javascripts/lib/ace.js
- app/assets/javascripts/lib/utils/ace_utils.js 6 个添加, 0 个删除app/assets/javascripts/lib/utils/ace_utils.js
- app/assets/javascripts/merge_conflicts/components/diff_file_editor.js 2 个添加, 1 个删除...avascripts/merge_conflicts/components/diff_file_editor.js
- app/helpers/blob_helper.rb 1 个添加, 1 个删除app/helpers/blob_helper.rb
- app/models/blob.rb 1 个添加, 1 个删除app/models/blob.rb
- app/models/concerns/blob_like.rb 1 个添加, 1 个删除app/models/concerns/blob_like.rb
- changelogs/unreleased/zj-remove-linguist.yml 5 个添加, 0 个删除changelogs/unreleased/zj-remove-linguist.yml
- lib/gitlab/blob_helper.rb 145 个添加, 0 个删除lib/gitlab/blob_helper.rb
- lib/gitlab/conflict/file.rb 0 个添加, 1 个删除lib/gitlab/conflict/file.rb
- lib/gitlab/git/blob.rb 4 个添加, 4 个删除lib/gitlab/git/blob.rb
- lib/gitlab/git/blob_snippet.rb 0 个添加, 34 个删除lib/gitlab/git/blob_snippet.rb
- lib/gitlab/language_data.rb 33 个添加, 0 个删除lib/gitlab/language_data.rb
- spec/controllers/projects/merge_requests/conflicts_controller_spec.rb 0 个添加, 1 个删除...lers/projects/merge_requests/conflicts_controller_spec.rb
- spec/lib/gitlab/blob_helper_spec.rb 125 个添加, 0 个删除spec/lib/gitlab/blob_helper_spec.rb
- spec/lib/gitlab/conflict/file_spec.rb 0 个添加, 5 个删除spec/lib/gitlab/conflict/file_spec.rb
加载中
想要评论请 注册 或 登录