Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newAsyncSmtp() raises exception with Nim 0.19.0 #9358

Closed
FedericoCeratto opened this issue Oct 13, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@FedericoCeratto
Copy link
Member

commented Oct 13, 2018

import smtp
newAsyncSmtp()

leads to:

Error: unhandled exception: /build/nim-UtAWG3/nim-0.19.0/compiler/suggest.nim(462, 12) `result == nil or result.kind == nkPragma`  [AssertionError]

Also see https://api.travis-ci.org/v3/job/441072469/log.txt

@skilchen

This comment has been minimized.

Copy link
Contributor

commented Oct 14, 2018

There are two things:

  • instead of raising a runtime exception when ssl is required, but the program was compiled without -d:ssl, smtp.nim now uses the error pragma to signal a missing -d:ssl at compiletime. This has the consequence that you now must compile with -d:ssl even if you pass useSsl = false to the constructors newSmtp or newAsyncSmtp.
  • the error you are seeing is the current way, how Nim tells you that you compiled without -d:ssl

Before commit 548fc77 Nim would tell you

Error: invalid pragma: error: "SMTP module compiled without SSL support"
@Araq

This comment has been minimized.

Copy link
Member

commented Oct 16, 2018

That's a compiler bug, the .error statement must not be treated as an .error proc annotation.

@Araq Araq added the Regression label Oct 16, 2018

@Araq Araq closed this in 0c3e673 Oct 25, 2018

narimiran added a commit to narimiran/Nim that referenced this issue Oct 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.