mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 06:25:51 +01:00
Fix incremental compilation problem caused by Slick.
This is temporary fix to decrease compilation time in development. Therefore this fix will be reverted in the future to add multiple database support capability.
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
package model
|
||||
|
||||
import slick.driver.JdbcProfile
|
||||
|
||||
trait Profile {
|
||||
val profile: JdbcProfile
|
||||
val profile = slick.driver.H2Driver
|
||||
import profile.simple._
|
||||
|
||||
// java.util.Date Mapped Column Types
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
package object model extends {
|
||||
// TODO [Slick 2.0]Should be configurable?
|
||||
val profile = slick.driver.H2Driver
|
||||
// TODO [Slick 2.0]To avoid compilation error about delete invocation. Why can't this error be resolved by import profile.simple._?
|
||||
val simple = profile.simple
|
||||
|
||||
} with AccountComponent
|
||||
package object model extends Profile
|
||||
with AccountComponent
|
||||
with ActivityComponent
|
||||
with CollaboratorComponent
|
||||
with GroupMemberComponent
|
||||
@@ -16,9 +11,11 @@ package object model extends {
|
||||
with PullRequestComponent
|
||||
with RepositoryComponent
|
||||
with SshKeyComponent
|
||||
with WebHookComponent with Profile {
|
||||
with WebHookComponent {
|
||||
|
||||
/**
|
||||
* Returns system date.
|
||||
*/
|
||||
def currentDate = new java.util.Date()
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import simple._
|
||||
import profile.simple._
|
||||
// TODO [Slick 2.0]NOT import directly?
|
||||
import model.dateColumnType
|
||||
import service.SystemSettingsService.SystemSettings
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import simple._
|
||||
import profile.simple._
|
||||
|
||||
trait ActivityService {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import scala.slick.jdbc.{StaticQuery => Q}
|
||||
import Q.interpolation
|
||||
|
||||
import model._
|
||||
import simple._
|
||||
import profile.simple._
|
||||
import util.Implicits._
|
||||
import util.StringUtil._
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import simple._
|
||||
import profile.simple._
|
||||
|
||||
trait LabelsService {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import simple._
|
||||
import profile.simple._
|
||||
// TODO [Slick 2.0]NOT import directly?
|
||||
import model.dateColumnType
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import simple._
|
||||
import profile.simple._
|
||||
|
||||
trait PullRequestService { self: IssuesService =>
|
||||
import PullRequestService._
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.eclipse.jgit.treewalk.TreeWalk
|
||||
import org.eclipse.jgit.lib.FileMode
|
||||
import org.eclipse.jgit.api.Git
|
||||
import model._
|
||||
import simple._
|
||||
import profile.simple._
|
||||
|
||||
trait RepositorySearchService { self: IssuesService =>
|
||||
import RepositorySearchService._
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import simple._
|
||||
import profile.simple._
|
||||
import util.JGitUtil
|
||||
|
||||
trait RepositoryService { self: AccountService =>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import simple._
|
||||
import profile.simple._
|
||||
|
||||
trait SshKeyService {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package service
|
||||
|
||||
import model._
|
||||
import simple._
|
||||
import profile.simple._
|
||||
import org.slf4j.LoggerFactory
|
||||
import service.RepositoryService.RepositoryInfo
|
||||
import util.JGitUtil
|
||||
|
||||
@@ -50,7 +50,7 @@ class PluginActionInvokeFilter extends Filter with SystemSettingsService with Re
|
||||
}
|
||||
|
||||
private def processRepositoryAction(path: String, request: HttpServletRequest, response: HttpServletResponse)
|
||||
(implicit session: model.simple.Session): Boolean = {
|
||||
(implicit session: model.profile.simple.Session): Boolean = {
|
||||
val elements = path.split("/")
|
||||
if(elements.length > 3){
|
||||
val owner = elements(1)
|
||||
|
||||
Reference in New Issue
Block a user