Conversation
|
Is there any update on this? It is mentioned in the docs already here. |
|
As #879 (comment) said, |
|
Hey everyone, This seems like a relatively small change, but would help greatly in writing wasm modules for Deno, is there anything blocking this? Is there anything to do to get it merged? |
| Target::Deno => {} | ||
| _ => gitignore_contents.push_str("*") | ||
| } | ||
| fs::write(out_dir.join(".gitignore"), gitignore_contents)?; |
There was a problem hiding this comment.
Instead of writing an empty file, it would be cleaner to not write it at all, I think.
But also, I'm nut sure this is necessary, why would targeting Deno be different in this regard? You might want to package up the resulting files into a separate repository (equivalent to putting it on npm for node), but at the same time want to keep the rust lib's source clean.
Having a wildcard .gitignore doesn't make sense in any other way, you obviously want to keep the results somewhere.
There was a problem hiding this comment.
I think this was the default behavior, they just removed that option for deno
the deleted line in 41 wrote * to .gitignore in every case, but @juzi5201314 probably concluded that it is not relevant for deno
this is still the state in the main branch (as of 2nd Feb, 2022)
and in the latest release atm
I agree about preferring not to create the .gitignore at all, but keeping the * for all other targets is just keeping the same behavior
changing this behavior is outside of the scope of this pr :)
There was a problem hiding this comment.
I agree that we should leave create_pkg_dir as it is.
I could see one improvement to the status quo where we could read the current contents of an existing .gitignore before deleting the directory and then writing them back afterwards so modifications made by the user persist, but this should be a separate PR if it is a desired feature.
There was a problem hiding this comment.
My comment is not very clear, reading it again now. I think my point was that this function should be left as-is, no need to special case it for Deno.
|
This looks helpful, is it missing anything? |
|
I am using this branch, couple of problems I had
except for this, it works perfectly! edit: after thinking about it a bit, the problems in 2 are probably problems in |
|
After another year ... it's not supported yet, the deno target |
|
I'd very much like to see this merged. Is anything holding us back? I'd be happy to provide the necessary adjustments if required. |
@Mipsters Your point 2.2 seems to be fixed in the current wasm-bindgen release, the path is concatenated differently now. |
|
@egfx-notifications wow, I barely remember what I did then, but I think that the ternary condition was not mine |
Then this seems to be fixed now. Tried cmd, Powershell and Git Bash on Windows, all give the correct result. |
egfx-notifications
left a comment
There was a problem hiding this comment.
As stated in the comments, please remove the modifications to create_pkg_dir.
Please also add deno to the list here so it will be listed as available option in the --help output.
| Target::Deno => {} | ||
| _ => gitignore_contents.push_str("*") | ||
| } | ||
| fs::write(out_dir.join(".gitignore"), gitignore_contents)?; |
There was a problem hiding this comment.
I agree that we should leave create_pkg_dir as it is.
I could see one improvement to the status quo where we could read the current contents of an existing .gitignore before deleting the directory and then writing them back afterwards so modifications made by the user persist, but this should be a separate PR if it is a desired feature.
|
Fixed in #1117. |
[x ] You have the latest version of
rustfmtinstalled[x ] You ran
cargo fmton the code base before submittingRelated issues
I want to build wasm for Deno. #672
Targeting Deno #879