Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Readonly file io error#1346

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@tesujimath
Copy link
Contributor

Fixes#1345

-r--r--r-- 1 guestsi users 126 Nov 25 14:53 hello-cpp-world.cppit23677> Rscript hello-rcpp-world.RLoading required package: RcppHello CPP World

Checklist

  • Code compiles correctly
  • R CMD check still passes all tests
  • Preferably, new tests were added which fail without the change
  • Document the changes by file inChangeLog

Copy link
Member

@eddelbuetteleddelbuettel left a comment

Choose a reason for hiding this comment

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

Two quick comments, one small request for change -- looks good generally.

// copy the source file to the build dir
Rcpp::Function filecopy =Rcpp::Environment::base_env()["file.copy"];
filecopy(cppSourcePath_,generatedCppSourcePath(),true);
filecopy(cppSourcePath_,generatedCppSourcePath(),true, Rcpp::_["copy.mode"] =false);
Copy link
Member

Choose a reason for hiding this comment

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

Nice. I'll look some more at that tomorrow over morning coffee -- this ensures we get 0644 irrespective of original permissionss?

tesujimath reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

Have by now caught up ontohelp(file.copy) -- this is perfect. Had worried that this code, because it dates back to before we had filesystem semantics from C++17 and all that, would have to do dance to do this portably. But farming out to a call to then underlying R instance we always have is golden, and that function has that option. Very nice.

tesujimath reacted with hooray emoji
Copy link
Member

Choose a reason for hiding this comment

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

I generally have a mild dislike ofRcpp::_[...] over the preferredRcpp::Named("...") but they are equivalent, and the former is used in the file already. So may change that another time....

tesujimath pushed a commit to AgResearch/KGD that referenced this pull requestNov 25, 2024
Bug in Rcpp blocked using readonly CPP source from Nix store,fixed in this PR, awaiting merge.RcppCore/Rcpp#1346
Copy link
Member

@eddelbuetteleddelbuettel left a comment

Choose a reason for hiding this comment

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

Looks good, one micro nag notwithstanding, and addresses the issue.

Thanks for putting it up.

tesujimath reacted with heart emoji
@eddelbuetteleddelbuettel merged commitfdd7205 intoRcppCore:masterNov 25, 2024
9 checks passed
tesujimath pushed a commit to AgResearch/KGD that referenced this pull requestDec 2, 2024
Enables running a defined version of KGD from the Nix store, which requireda recent version of Rcpp with this bugfix:RcppCore/Rcpp#1346For example usage see gbs_prism eri-dev branch.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@eddelbuetteleddelbuetteleddelbuettel approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

File io error for sourceCpp of a readonly file

2 participants

@tesujimath@eddelbuettel

[8]ページ先頭

©2009-2025 Movatter.jp