google / clasp

🔗 Command Line Apps Script Projects
https://developers.google.com/apps-script/guides/clasp
Apache License 2.0
4.59k stars 428 forks source link

Incorrect warning on clasp pull? #851

Open ethanresnick opened 3 years ago

ethanresnick commented 3 years ago

Expected Behavior

After I do a clasp pull, I get an warning message in the output that says:

Warning: files in subfolder are not accounted for unless you set a '.claspignore' file.

I'm pretty sure this warning is not correct, because I think there are default claspignore rules that do account for (i.e., do not ignore) script/html files in subfolders. Is that correct? If so, I would expect not to see this warning.

Actual Behavior

The warning above.

Specifications

PopGoesTheWza commented 3 years ago

This warning is by design and its history is difficult to track back.

https://github.com/google/clasp/blob/d6fbaae5e6ad6353fe8dc9ff771c1aed1b6b1a59/src/messages.ts#L105-L108

It is always displayed with clone, create and pull commands, and is no longer aligned with the default set of patterns

https://github.com/google/clasp/blob/d6fbaae5e6ad6353fe8dc9ff771c1aed1b6b1a59/src/dotfile.ts#L39-L52

@sqrrrl any thoughts about leaving as is or updating the message?

ethanresnick commented 3 years ago

@PopGoesTheWza Yeah, that’s what I was getting at: since it no longer aligns with the actual fallback behavior when there’s no user-provided claspignore, it just seems misleading/confusing and it made me wonder if I actually was doing something risky that I didn’t understand

sqrrrl commented 3 years ago

+1 -- noticed this earlier today and we can either drop it or at least tighten up the conditions where it's displayed.

PopGoesTheWza commented 3 years ago

Who votes it drop it? I surely do...