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
I was getting inconsistent behavior with the grunt-screeps module where sometimes, some of the files in my dist/ folder were not being uploaded. The behavior was inconsistent however. Sometimes all of my files would be uploaded, sometimes a few would be cut off.
It looks like the issue is that there is a POST request being sent with all of the files, for EACH file found. Essentially it is just an indentation issue where the post request construction and execution should not be inside of the forEach(file) function.
I'm happy to submit a PR for this bug.
The text was updated successfully, but these errors were encountered:
I'm pretty sure this isn't actually a bug, and your PR will effectively break some features of this tool(although I'm not sure anyone uses these features) I'm working on setting up a new codebase and happened across this post, so decided to test this out while I was poking around in the code.
The foreach function that contains the POST request doesn't run a for each on the FILES, but the.. mappings? if you look, it's doing a filter and then a map on the for each's iteration variable's .src property, which is apparently a list of the actual file paths that have been requested to be uploaded.
I'm guessing this means you could, with some creative settings(google "grunt this.files" for more info on how the files array works) have this plugin upload a combined set of files from two different directories.
Either way, it seems like it's working the way it's supposed to, it's just that grunt is kinda complicated, apparently.
I'm guessing you have something weird going on with your config. do you have multiple deploy targets setup maybe? Can you post your gruntfile so we can see if there's anything going on there?
I also encounter missing file problem. But I noticed that the Gruntfile I copied from is filled with complicated settings in screeps.dist session. This Gruntfile is in the readme file of grunt-screeps repo. I think the problem is cause by screeps.dist.files
settings although I dont realy understand their meanings.
After I change the Gruntfile to the simple one descripbed in https://docs.screeps.com/contributed/advanced_grunt.html , the missing file problem seem to be solved.
I was getting inconsistent behavior with the grunt-screeps module where sometimes, some of the files in my dist/ folder were not being uploaded. The behavior was inconsistent however. Sometimes all of my files would be uploaded, sometimes a few would be cut off.
It looks like the issue is that there is a POST request being sent with all of the files, for EACH file found. Essentially it is just an indentation issue where the post request construction and execution should not be inside of the forEach(file) function.
I'm happy to submit a PR for this bug.
The text was updated successfully, but these errors were encountered: