-
Notifications
You must be signed in to change notification settings - Fork 1
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
Production code is missing typespecs #3
Comments
Hi @grzegorz225! That sounds weird, we're using it successfully across multiple production deployments (both using Could you provide a bit more information/example code to reproduce? |
@frekw Here is an minimal example which showcases the problem: The app does not work as a compiled release:
In the demo I'm getting the same error as in my other project. |
@grzegorz225 interesting, I haven't seen that behaviour with Adding the following configuration keeps the typespec metadata around even when assembling a release: def project do
[
app: :forma_demo,
version: "0.1.0",
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
deps: deps(),
releases: [
forma_demo: [strip_beams: false]
]
]
end |
See https://hexdocs.pm/mix/Mix.Tasks.Release.html#module-options for more information. |
Expected behavior:
Forma works in self-contained releases.
Actual behavior:
Forma is working well in the dev environment. Forma isn't working at all in compiled releases as the typespecs the library is using are stripped away during compilation. Trying to use forma in production code results in the following error:
The text was updated successfully, but these errors were encountered: