nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.41k stars 1.47k forks source link

New version of Nim does not compile my code #3356

Closed Dhertz closed 8 years ago

Dhertz commented 8 years ago

After pulling from the HEAD of devel my code will no longer compile, citing an error in the system library. It compiles fine with commit 721324380dc753aa59efdcd2372b4c8a0e6a9252 but not at more recent commits.

Here is the error given by the compiler:

lib/pure/asyncdispatch.nim(163, 6) template/generic instantiation from here
lib/system.nim(182, 13) Error: invalid type: 'Future' in this context: 'proc (a: var ref Future:ObjectType){.noSideEffect.}'
Araq commented 8 years ago

Well it's kinda hard to fix when you do "include secrets" which your git repo lacks.

Dhertz commented 8 years ago

Sorry about that, the file contains private API keys and other secrets. Here is an overview:

secrets.nim

const
  FORECAST_IO_KEY     = "xxxxxxxxxxxxxxxxxxxxx"
  MBTA_KEY            = "xxxxxxxxxxxxxxxxxxxxx"
  purpleEmail         = "recipient@example.com"
  myEmail             = "sender@example.com"
  SMTPServer          = "smtp.example.com"