Commit 24d139ba authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'rs-revert-preload-lib' into 'master'

Revert "Preload lib/"

This reverts commit 5511a731.

The original commit added this because it also enabled threadsafety, a change which was itself later reverted in 66d6c809, but this got left behind.

I don't fully understand the reasoning behind it so if I'm wrong, please tell me.

My reasoning for reverting it is that it messes with Rails' (and by extension Spring's) class reloading during development. When I was working in `lib/gitlab/markdown` and had to stop and restart the server every time I made a change, I didn't know it at the time, but this was why. That was a huge pain point.

If it's needed for production perhaps we could add a `if Rails.env.production?` clause around it so that it doesn't mess with development.

See merge request !1758
parents 256d2ae7 c9a1634f
require 'gitlab' # Load lib/gitlab.rb as soon as possible
class Settings < Settingslogic
source ENV.fetch('GITLAB_CONFIG') { "#{Rails.root}/config/gitlab.yml" }
namespace Rails.env
......
......@@ -6,8 +6,3 @@ module Gitlab
Settings
end
end
#
# Load all libs for threadsafety
#
Dir["#{Rails.root}/lib/**/*.rb"].each { |file| require file }
require 'gitlab/git'
module Gitlab
autoload :Satellite, 'gitlab/satellite/satellite'
end
require 'gitlab/oauth/user'
require 'gitlab/o_auth/user'
# LDAP extension for User model
#
......
module Gitlab
module Satellite
autoload :DeleteFileAction, 'gitlab/satellite/files/delete_file_action'
autoload :EditFileAction, 'gitlab/satellite/files/edit_file_action'
autoload :FileAction, 'gitlab/satellite/files/file_action'
autoload :NewFileAction, 'gitlab/satellite/files/new_file_action'
class CheckoutFailed < StandardError; end
class CommitFailed < StandardError; end
class PushFailed < StandardError; end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment