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

Copy directories in rake task files list #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ajwood-acquia
Copy link

The rsync command used to copy project files to the build dir in Microbus::RakeTask does not respect directories without the recursive flag. An error message is printed, but it happens early in the build process and does not cause the task to error, so it is easily missed, which is frustrating.

@glennpratt
Copy link
Contributor

IIRC, the source of this list is intended to be a Gemspec files list:

https://guides.rubygems.org/specification-reference/#files

I'll have to ponder for a second if this would break anything. One of my goals for microbus is to follow Gem conventions and also not allow accidental size bloat by including stuff that's isn't actually a runtime requirement of the project.

@ajwood-acquia
Copy link
Author

I'm using a Gemspec files list in my use case, that's how i arrived at this issue.

If you decide that including directories is not an appropriate use case, I'd instead suggest raising an error when a directory name is encountered in the files list. I can make a PR for that if you feel this is a better solution.

@glennpratt
Copy link
Contributor

I think this diverges from the spec too much and RubyGems or Microbus could change in a way where we no longer get the directories.

@ajwood-acquia suggested we error instead, which unfortunately RubyGems doesn't do. I'm fine with that, but we'd need to change this PR to do that.

@glennpratt
Copy link
Contributor

Relevant spec section to save people a click:

FILES
Files included in this gem. You cannot append to this accessor, you must assign to it.

Only add files you can require to this list, not directories, etc.

Directories are automatically stripped from this list when building a gem, other non-files cause an error.

@rutuja810 rutuja810 force-pushed the master branch 4 times, most recently from b07d024 to 729595a Compare February 7, 2023 18:18
Sign up for free to 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.

2 participants