makes icon indicating copy to clipboard operation
makes copied to clipboard

enforce camelCase outputs

Open kamadorueda opened this issue 3 years ago • 10 comments

depending on how you name folders on the makes/ folder, the outputs are going to look like-this, or likeThis, or whatever you name the directories.

for consistency with makes built-ins, we should translate directory names to camelCase: https://levelup.gitconnected.com/converting-a-string-to-camelcase-in-javascript-f88a646a22b4

so people can have directories like /makes/my-derivation/main.nix, but execute m .myDerivation

nix has no built-in, and nixpkgs does not have a function in lib.strings, so we should create our own in this function: https://github.com/fluidattacks/makes/blob/27b669a539c6be8caffbbfab23da07a8c87a1f13/src/modules/outputs/custom.nix#L16 (turn name into camelCase before appending to the list)

kamadorueda avatar Jun 29 '21 17:06 kamadorueda

example of the casing incoherence:

image

kamadorueda avatar Jun 29 '21 17:06 kamadorueda

@kamadorueda I am interested in working on this issue. Can I work on it?

0xt3j4s avatar Apr 13 '23 03:04 0xt3j4s

@kamadorueda I am interested in working on this issue. Can I work on it?

@dsalaza4 is the current maintainer

kamadorueda avatar Apr 13 '23 04:04 kamadorueda

Hi, @dsalaza4! Can I work on this issue?

0xt3j4s avatar Apr 13 '23 05:04 0xt3j4s

@0xt3j4s Sure! If you have any questions do not hesitate to ask!

dsalaza4 avatar Apr 25 '23 20:04 dsalaza4

This is the relevant source code:

https://github.com/fluidattacks/makes/blob/main/src/evaluator/modules/default.nix#L91

dsalaza4 avatar Apr 25 '23 20:04 dsalaza4

Thank you, @dsalaza4! I'll start working on this issue and make a PR soon.

0xt3j4s avatar Apr 27 '23 18:04 0xt3j4s

Hey @dsalaza4, in the description of the issue, it is given that I need to change the name to camelCase in this file.

While you had given a different source code that is quite similar to the one shown in the issue, though in a another directory.

Can you confirm the name conversion to camelCase should be done in which directory or branch?

0xt3j4s avatar May 20 '23 11:05 0xt3j4s

@0xt3j4s As this issue was created years ago, the source code has changed significantly. The file mentioned initially no longer exists.

dsalaza4 avatar May 23 '23 21:05 dsalaza4

Oh, Ok. I got it and will work accordingly.

0xt3j4s avatar May 26 '23 02:05 0xt3j4s