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
|
package model
|
||||||
|
|
||||||
import slick.driver.JdbcProfile
|
|
||||||
|
|
||||||
trait Profile {
|
trait Profile {
|
||||||
val profile: JdbcProfile
|
val profile = slick.driver.H2Driver
|
||||||
import profile.simple._
|
import profile.simple._
|
||||||
|
|
||||||
// java.util.Date Mapped Column Types
|
// java.util.Date Mapped Column Types
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
package object model extends {
|
package object model extends Profile
|
||||||
// TODO [Slick 2.0]Should be configurable?
|
with AccountComponent
|
||||||
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
|
|
||||||
with ActivityComponent
|
with ActivityComponent
|
||||||
with CollaboratorComponent
|
with CollaboratorComponent
|
||||||
with GroupMemberComponent
|
with GroupMemberComponent
|
||||||
@@ -16,9 +11,11 @@ package object model extends {
|
|||||||
with PullRequestComponent
|
with PullRequestComponent
|
||||||
with RepositoryComponent
|
with RepositoryComponent
|
||||||
with SshKeyComponent
|
with SshKeyComponent
|
||||||
with WebHookComponent with Profile {
|
with WebHookComponent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns system date.
|
* Returns system date.
|
||||||
*/
|
*/
|
||||||
def currentDate = new java.util.Date()
|
def currentDate = new java.util.Date()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import model._
|
import model._
|
||||||
import simple._
|
import profile.simple._
|
||||||
// TODO [Slick 2.0]NOT import directly?
|
// TODO [Slick 2.0]NOT import directly?
|
||||||
import model.dateColumnType
|
import model.dateColumnType
|
||||||
import service.SystemSettingsService.SystemSettings
|
import service.SystemSettingsService.SystemSettings
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import model._
|
import model._
|
||||||
import simple._
|
import profile.simple._
|
||||||
|
|
||||||
trait ActivityService {
|
trait ActivityService {
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import scala.slick.jdbc.{StaticQuery => Q}
|
|||||||
import Q.interpolation
|
import Q.interpolation
|
||||||
|
|
||||||
import model._
|
import model._
|
||||||
import simple._
|
import profile.simple._
|
||||||
import util.Implicits._
|
import util.Implicits._
|
||||||
import util.StringUtil._
|
import util.StringUtil._
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import model._
|
import model._
|
||||||
import simple._
|
import profile.simple._
|
||||||
|
|
||||||
trait LabelsService {
|
trait LabelsService {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import model._
|
import model._
|
||||||
import simple._
|
import profile.simple._
|
||||||
// TODO [Slick 2.0]NOT import directly?
|
// TODO [Slick 2.0]NOT import directly?
|
||||||
import model.dateColumnType
|
import model.dateColumnType
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import model._
|
import model._
|
||||||
import simple._
|
import profile.simple._
|
||||||
|
|
||||||
trait PullRequestService { self: IssuesService =>
|
trait PullRequestService { self: IssuesService =>
|
||||||
import PullRequestService._
|
import PullRequestService._
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import org.eclipse.jgit.treewalk.TreeWalk
|
|||||||
import org.eclipse.jgit.lib.FileMode
|
import org.eclipse.jgit.lib.FileMode
|
||||||
import org.eclipse.jgit.api.Git
|
import org.eclipse.jgit.api.Git
|
||||||
import model._
|
import model._
|
||||||
import simple._
|
import profile.simple._
|
||||||
|
|
||||||
trait RepositorySearchService { self: IssuesService =>
|
trait RepositorySearchService { self: IssuesService =>
|
||||||
import RepositorySearchService._
|
import RepositorySearchService._
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import model._
|
import model._
|
||||||
import simple._
|
import profile.simple._
|
||||||
import util.JGitUtil
|
import util.JGitUtil
|
||||||
|
|
||||||
trait RepositoryService { self: AccountService =>
|
trait RepositoryService { self: AccountService =>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import model._
|
import model._
|
||||||
import simple._
|
import profile.simple._
|
||||||
|
|
||||||
trait SshKeyService {
|
trait SshKeyService {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import model._
|
import model._
|
||||||
import simple._
|
import profile.simple._
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import service.RepositoryService.RepositoryInfo
|
import service.RepositoryService.RepositoryInfo
|
||||||
import util.JGitUtil
|
import util.JGitUtil
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class PluginActionInvokeFilter extends Filter with SystemSettingsService with Re
|
|||||||
}
|
}
|
||||||
|
|
||||||
private def processRepositoryAction(path: String, request: HttpServletRequest, response: HttpServletResponse)
|
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("/")
|
val elements = path.split("/")
|
||||||
if(elements.length > 3){
|
if(elements.length > 3){
|
||||||
val owner = elements(1)
|
val owner = elements(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user