buildtools icon indicating copy to clipboard operation
buildtools copied to clipboard

Bug: reordering deps

Open mobileink opened this issue 5 years ago • 4 comments

Is there a flag to turn off dep sorting? Dependency ordering is significant for some languages/tools, so sorting deps renders buildifier unusable. Case in point: OCaml.

Thanks,

Gregg

mobileink avatar Jul 17 '20 01:07 mobileink

You can mark a certain list of deps with a comment containing do not sort. Alternatively you can update the following list do disable sorting of a certain attribute of a certain rule: https://github.com/bazelbuild/buildtools/blob/master/tables/tables.go#L151 . I can do that myself if you tell the exact rule and attribute names.

vladmos avatar Jul 17 '20 10:07 vladmos

Thanks! So for SortableBlacklist I would add something like "ocaml_library.deps: true ?

On Fri, Jul 17, 2020 at 5:26 AM Vladimir Moskva [email protected] wrote:

You can mark a certain list of deps with a comment containing do not sort. Alternatively you can update the following list do disable sorting of a certain attribute of a certain rule: https://github.com/bazelbuild/buildtools/blob/master/tables/tables.go#L151 . I can do that myself if you tell the exact rule and attribute names.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bazelbuild/buildtools/issues/875#issuecomment-660024235, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAES2NDRDTIFMOEW7FBSF2TR4ARNBANCNFSM4O5ILHNA .

mobileink avatar Jul 17 '20 10:07 mobileink

Yes. Do you want to send a pull request or do you want me to make a change myself?

vladmos avatar Jul 20 '20 15:07 vladmos

Let's hold off for now. The comment works, the ocaml rules are still under development.

Thanks Gregg

On Mon, Jul 20, 2020 at 10:51 AM Vladimir Moskva [email protected] wrote:

Yes. Do you want to send a pull request or do you want me to make a change myself?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bazelbuild/buildtools/issues/875#issuecomment-661124115, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAES2NEQC2WZURZ7VHGG72TR4RRXHANCNFSM4O5ILHNA .

mobileink avatar Jul 20 '20 16:07 mobileink