Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Discord Bot Discord Bot
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • UCC
  • Discord BotDiscord Bot
  • Merge requests
  • !1

Config file

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged squimmy requested to merge config-file into master Jan 30, 2020
  • Overview 1
  • Commits 2
  • Changes 10

This change moves (most of) the config stuff into config files that are loaded at runtime.

It seems to work okay but there are a couple of problems:

  • I don't like that the contents of the config file are kept around as a separate static string, but it seems like the deserializer expects a string with equivalent lifetime to the value it deserializes to. This strikes me as a little odd. Is there some sort of workaround to this? I glanced over the toml source and it looks like all the deserialization methods have the same lifetime parameters.

  • discord_token is still being loaded at compile time, which sucks. In theory we should be able to load it as a static just like CONFIG_FILE, but I get a confusing type-error when I try that, so maybe someone who knows more about rust can help me out there.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: config-file