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

Fixes bug with release being undefined and adds --no-debug to production run #307

Merged
merged 4 commits into from Oct 16, 2017

Conversation

elorest
Copy link
Member

@elorest elorest commented Oct 16, 2017

Description of the Change

This allows it to work with LLVM 4.0 on linux.
Also saves a bit of time on compiling.
Fixes bug where if run command was used for development or test it would error because #{release} didn't exist.
Fixes issue #308

@elorest elorest changed the title Adds --no-debug to production run. Fixes bug with release being undefined and adds --no-debug to production run Oct 16, 2017
Copy link
Member

@drujensen drujensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

build_options = Array(String).new
build_options << "--release" if options.e.downcase == "production"
build_options << "--no-debug" if options.e.downcase == "production"
build_options << " " if build_options.size > 0
Copy link
Contributor

@veelenga veelenga Oct 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be done in a bit cleaner manner:

if options.e.downcase == "production"
  build_options.concat ["--release", "--no-debug", " "]
end

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote it this way so that we could add different options for different reasons but only have a space if there was at least one option.

If it will never change we could just write build_options += "--release --no-debug "

Copy link
Contributor

@veelenga veelenga Oct 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but .downcase and == "production" are about to execute twice, what is not really good

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the above is much cleaner. I will also remove the additional space " " and just add the space on line 28 between the } $

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But then it ends up with 2 spaces in the case that the env isn't production.

Copy link
Contributor

@eliasjpr eliasjpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the suggestion @veelenga

build_options = Array(String).new
build_options << "--release" if options.e.downcase == "production"
build_options << "--no-debug" if options.e.downcase == "production"
build_options << " " if build_options.size > 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the above is much cleaner. I will also remove the additional space " " and just add the space on line 28 between the } $

Copy link
Contributor

@eliasjpr eliasjpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better!

@elorest elorest merged commit dbc32d6 into master Oct 16, 2017
@eliasjpr eliasjpr deleted the is/add_no_debug_to_production_run branch October 27, 2017 10:53
marksiemers pushed a commit to marksiemers/amber that referenced this pull request Oct 28, 2017
…ion run (amberframework#307)

* Adds --no-debug to production run.

This allows it to work with LLVM 4.0 on linux.

* initializing array(string)

* added support for issue amberframework#308 and cleaned up
elorest added a commit that referenced this pull request Nov 17, 2017
…ion run (#307)

* Adds --no-debug to production run.

This allows it to work with LLVM 4.0 on linux.

* initializing array(string)

* added support for issue #308 and cleaned up
@faustinoaq faustinoaq added this to Done in Framework 2018 May 5, 2018
@faustinoaq faustinoaq removed this from Done in Framework 2018 Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants