Skip to content

Don't chdir globally - #49

Merged
zzak merged 3 commits into
hone:masterfrom
tagomoris:fix-rakefile
Sep 27, 2016
Merged

Don't chdir globally#49
zzak merged 3 commits into
hone:masterfrom
tagomoris:fix-rakefile

Conversation

@tagomoris

Copy link
Copy Markdown
Contributor

Calling Dir.chdir in top level of Rakefile makes us not to add any tasks which should run on project root directory.
IMO, it's better to show working directory per tasks explicitly than doing chdir it globally.

@tagomoris

Copy link
Copy Markdown
ContributorAuthor

I know #43 (and I'm waiting it'll be merged and released), but it seems a bit large for quick merge.
This one is just removing global Dir.chdir to add another tasks.

@zzak

zzak commented Sep 16, 2016

Copy link
Copy Markdown
Contributor

Agreed, this is a good first step

@tagomoristagomoris reopened this Sep 23, 2016
@zzak

zzak commented Sep 23, 2016

Copy link
Copy Markdown
Contributor

Could you rebase? <3

@tagomoris

Copy link
Copy Markdown
ContributorAuthor

I want to add this change on #47. What's the status of it?

@zzak

zzak commented Sep 23, 2016

Copy link
Copy Markdown
Contributor

@tagomoris merged.

* Calling Dir.chdir in top level of Rakefile makes us not to add any tasks which should run on project root directory.
@tagomoris

Copy link
Copy Markdown
ContributorAuthor

@zzak done.

@toch

toch commented Sep 23, 2016

Copy link
Copy Markdown
Collaborator

Thanks @tagomoris
those changes need also to be applied to the Rakefile. Could you also please add them there?

have you checked how it plays with the changes that will be soon introduced by #43 ?

@zzak

zzak commented Sep 23, 2016

Copy link
Copy Markdown
Contributor

@toch I think this patch as a smaller version of Eric's patch that should be easier to swallow, and allow us to move into that direction.

@tagomoris

Copy link
Copy Markdown
ContributorAuthor

I pushed a commit to update Rakefile by updated setup.rb

@tagomoris

Copy link
Copy Markdown
ContributorAuthor

ping?

Comment threadRakefile Outdated
APP_VERSION = (app_version.nil? || app_version.empty?) ? "unknown" : app_version

desc "compile all the binaries"
desc "compile binary"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this still compiles "all" binaries, right? why change the comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I previously worked with Rakefile generated by mruby-cli v0.0.4.
Now I fixed and pushed it.

Comment threadRakefile Outdated
desc "run all tests"
Rake::Task['test'].clear
task :test => ['test:bintest', 'test:mtest']
task :test => ["test:mtest", "test:bintest"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why change the order and quotations?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Pushed commits without such unneeded changes.

Comment threadRakefile
abort("Not running in docker, you should type \"docker-compose run <task>\".") \
unless is_in_a_docker_container?
abort("Not running in docker, you should type \"docker-compose run <task>\".") unless is_in_a_docker_container?
old_task.invoke

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you put this back on two lines?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

ditto.

@zzak

zzak commented Sep 27, 2016

Copy link
Copy Markdown
Contributor

setup.rb LGTM, please make the changes I mentioned to Rakefile and I will merge

@tagomoris

Copy link
Copy Markdown
ContributorAuthor

@zzak Thank you to notify me about it. I pushed fixed commits, and another fix for release task.
It works well for my project.

@zzak
zzak merged commit bf1fc6e into hone:masterSep 27, 2016
@zzakzzak changed the title Not to chdir globallyDon't chdir globallySep 27, 2016
@tagomoris
tagomoris deleted the fix-rakefile branch December 3, 2016 03:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tagomoris@zzak@toch