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

Better control over which files pub publishes and provides to barback #9841

Closed
DartBot opened this issue Apr 11, 2013 · 17 comments
Closed

Better control over which files pub publishes and provides to barback #9841

DartBot opened this issue Apr 11, 2013 · 17 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Apr 11, 2013

This issue was originally filed by voj...@google.com


pub publish should allow .pubignore or something - there are files (eg. tests or other development specific that I don’t wanna publish, but I wanna keep in git, so using .gitignore is not flexilbe enough, even though it's a good default).

@sethladd
Copy link
Contributor

Removed Type-Defect label.
Added Type-Enhancement, Area-Pub, Triaged labels.

@munificent
Copy link
Member

We've talked about this too. I don't think we'll get to it soon, but it's a good idea.


Added this to the Later milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@DartBot
Copy link
Author

DartBot commented Jul 18, 2014

This comment was originally written by @Fox32


Is it possible was already implemented, but using the .gitignore file? I have trouble with some pub serve and files that are on the .gitignore. The files are not served as long they are on the .gitignore.

Is is possible to use a seperate .pubignore instead?

@nex3
Copy link
Member

nex3 commented Jul 18, 2014

Pub has always ignored .gitignored files for the purposes of publishing, and relatively recently it began ignoring them for "pub build" and "pub serve" as well.

This issue is still open because we thing a special .pubignore might be a good idea, but we don't really have time to devote to designing/implementing it in the near future.

@DartBot
Copy link
Author

DartBot commented Jul 18, 2014

This comment was originally written by @Fox32


Is it somewhere in the documentation? Because I had to learn about the .gitignore feature in pub serve the hard way.

@nex3
Copy link
Member

nex3 commented Jul 18, 2014

I'm not sure it is. Can you file an issue to add it!

@DartBot
Copy link
Author

DartBot commented Jul 18, 2014

This comment was originally written by @Fox32


See Issue #20110

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@munificent
Copy link
Member

This bug was originally asking for a .pubignore file, but I'm going to retarget and broaden it to describe the underlying problem. Pub needs to determine two things:

  1. Which files are included in the published package.
  2. Which files are provided to barback (which in turn means which files end up served by pub served, in the output of pub build, etc.)

For a long time, the rule for 1. was:

  • If the package is in a Git repo, use the user's .gitignore file to determine what to ignore. Specifically, it invokes git ls-files and uses the output of that.
  • If it's not a Git repo, we just have some basic white and blacklists.

This isn't a perfect solution, but it's seemed to have worked pretty well.

We recently extended the same logic to pub build, and based on lots of feedback, it's not the right choice. It did solve some issues (#­12102, #­11198), but it's caused even more.

I don't know what the solution should be yet, but I think we need to address it soon. This will be the tracking bug for it. Natalie, I added you as owner because you most recently touched this, but I'm also fine with implementing the solution once we decide what to do here.


Set owner to @nex3.
Added this to the 1.7 milestone.
Removed Priority-Medium label.
Added Priority-High label.
Changed the title to: "Better control over which files pub publishes and provides to barback".

@munificent
Copy link
Member

Issue #20749 has been merged into this issue.

@nex3
Copy link
Member

nex3 commented Sep 4, 2014

Issue #20795 has been merged into this issue.

@dgrove
Copy link
Contributor

dgrove commented Sep 23, 2014

Is this going to happen for 1.7?

@munificent
Copy link
Member

Set owner to @munificent.
Added Started label.

@munificent
Copy link
Member

I've rolled back the behavior in pub that makes it use the .gitignore file for build/serve. (It still uses it for publish, like it always has). This gets us back to the old not-great-but-not-totally-painful behavior:

https://codereview.chromium.org/342553002/

I'm leaving this bug open because we still need something user-configurable, but I'm lowering the priority now that the critical pain point is fixed.


Removed this from the 1.7 milestone.
Removed Priority-High label.
Added Priority-Medium, Triaged labels.

@nex3
Copy link
Member

nex3 commented Oct 17, 2014

Issue #21349 has been merged into this issue.


cc @munificent.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/pub#508.

@DartBot DartBot closed this as completed Jun 5, 2015
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

7 participants