You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A silent failure occurs if a file path listed in filePushOrder does not exist #984
I think this could be a warning, rather than an error that cancels the push and raises the exit code. If the file is no longer part of the project, that suggests it's not needed anymore.
Could be, sure. But on the other hand, there’s the case of typos. In my case, I was trying to fix an intermittent problem with a program that seemed to be caused by race conditions in code loading. I thought it might help to have a certain file pushed first, before all the rest. So I added this key to the config file and pushed, and… no change.
Weeks later I double checked and realized I had a missing character in the file name, the result of a typo. So my attempted fix had never actually taken effect, and since clasp had (IMO) failed silently, it took me a long time to find out about it.
Personally I prefer tools to fail fast and fail loudly, any time they cannot accomplish exactly what I’ve asked them to do.
Leaving as is for now. The push order isn't meant to be authoritative, rather meant as way to override the natural sort order. Think of it more of a way to hint at the priority of files -- if you want one file to always be first, just list that one file, everything else will get sorted after that.
Making that list authoritative may lead to a worse UX such as when refactoring/renaming files. It's an extra step to have to update .clasp.json each time a file is renamed or deleted.
Looking at adding a warning though for next release
Opened #1159 for this. checkMissingFilesFromPushOrder already computed the missing entries but was never called and never returned them, so the missing file was silently skipped. The PR returns the list, checks it in push() before uploading, and throws with a non-zero exit when a filePushOrder path has no local file. Added a test for the missing-file case.
Activity
Nu11u5 commentedon Nov 2, 2023
I think this could be a warning, rather than an error that cancels the push and raises the exit code. If the file is no longer part of the project, that suggests it's not needed anymore.
aviflax commentedon Nov 2, 2023
Could be, sure. But on the other hand, there’s the case of typos. In my case, I was trying to fix an intermittent problem with a program that seemed to be caused by race conditions in code loading. I thought it might help to have a certain file pushed first, before all the rest. So I added this key to the config file and pushed, and… no change.
Weeks later I double checked and realized I had a missing character in the file name, the result of a typo. So my attempted fix had never actually taken effect, and since
clasphad (IMO) failed silently, it took me a long time to find out about it.Personally I prefer tools to fail fast and fail loudly, any time they cannot accomplish exactly what I’ve asked them to do.
dandv commentedon Jan 30, 2025
Still seeing this for nonexistent files in
filePushOrderwith v2.5.0.sqrrrl commentedon Mar 12, 2025
Leaving as is for now. The push order isn't meant to be authoritative, rather meant as way to override the natural sort order. Think of it more of a way to hint at the priority of files -- if you want one file to always be first, just list that one file, everything else will get sorted after that.
Making that list authoritative may lead to a worse UX such as when refactoring/renaming files. It's an extra step to have to update .clasp.json each time a file is renamed or deleted.
Looking at adding a warning though for next release
fix(push): error on non-existent filePushOrder entries instead of fai…
test(push): reject when a filePushOrder entry does not exist (google#984
gunjanjaswal commentedon Jul 1, 2026
Opened #1159 for this.
checkMissingFilesFromPushOrderalready computed the missing entries but was never called and never returned them, so the missing file was silently skipped. The PR returns the list, checks it inpush()before uploading, and throws with a non-zero exit when afilePushOrderpath has no local file. Added a test for the missing-file case.