Standardize DEPS files formatting

14 views
Skip to first unread message

Edward Lesmes

unread,
Apr 18, 2018, 1:02:15 PM4/18/18
to infra-announce
If you are not an OWNER of a DEPS file you can stop reading now.

I would like to change the way the DEPS files are formatted in a totally backwards compatible way. See here for details on the new format.

I’ve been developing tools to deal with DEPS files programmatically. However the wildly different ways to express dependencies in DEPS files makes this a hard task.
I would like to move towards a single unified format, totally backwards compatible, for all DEPS files, and possibly enable a PRESUBMIT check to enforce it with warnings.

I don’t expect this to cause any issues, since no support will be removed, but please let me know if you have any concerns, questions or comments.

Thank you!

--
You received this message because you are subscribed to the Google Groups "infra-announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infra-announc...@chromium.org.
To post to this group, send email to infra-a...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/infra-announce/CAJAfbwthomPdibkzMYDCc%2BtWgQnZ%3D4h%2BnsyEk_wYc7umqR%2BwOw%40mail.gmail.com.

Nico Weber

unread,
Apr 18, 2018, 2:06:42 PM4/18/18
to ehmal...@chromium.org, infra-announce
Is `git cl format` going to do automatic formatting of DEPS files? That's the hook we use for formatting other file types (.cc, .gn, .xml, ...)

On Wed, Apr 18, 2018 at 12:47 PM, Edward Lesmes <ehmal...@chromium.org> wrote:
If you are not an OWNER of a DEPS file you can stop reading now.

I would like to change the way the DEPS files are formatted in a totally backwards compatible way. See here for details on the new format.

I’ve been developing tools to deal with DEPS files programmatically. However the wildly different ways to express dependencies in DEPS files makes this a hard task.
I would like to move towards a single unified format, totally backwards compatible, for all DEPS files, and possibly enable a PRESUBMIT check to enforce it with warnings.

I don’t expect this to cause any issues, since no support will be removed, but please let me know if you have any concerns, questions or comments.

Thank you!

--
You received this message because you are subscribed to the Google Groups "infra-announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infra-announce+unsubscribe@chromium.org.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAJAfbwthomPdibkzMYDCc%2BtWgQnZ%3D4h%2BnsyEk_wYc7umqR%2BwOw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "infra-announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infra-announc...@chromium.org.
To post to this group, send email to infra-a...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/infra-announce/CAMGbLiF2Ctn%3DGjLpQu2OuLyJXsfjdi17U53q3f54Y4YhJ7tr3w%40mail.gmail.com.

Nico Weber

unread,
Apr 27, 2018, 9:23:52 AM4/27/18
to Edward Lemur, Edward Lesmes, infra-announce
I'd suggest that the only way to presubmit-check for deps formatting is by auto-formatting them in the presubmit and checking that that's a no-op. Having a presubmit that checks for a certain formatting without a "run $x to auto-format" output seems like a step back from what we've achieved for all other languages we use -- they all print a command to fix formatting. So it's ok if the autoformatter takes some time, but presubmit-checking the formatting of deps files should be blocked on it existing.

On Wed, Apr 18, 2018 at 3:49 PM, Edward Lemur <ehmal...@google.com> wrote:
Yeah, it's something I want to look into, but it would probably take some time.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/infra-announce/CAMGbLiFt-Kbkx_PSJ7PRtMQi8TAG13jA%3DmgUsdhGHMnk%2BBpa6A%40mail.gmail.com.

Dirk Pranke

unread,
Apr 28, 2018, 5:52:59 PM4/28/18
to Nico Weber, Edward Lemur, Edward Lesmes, infra-dev
bcc infra-announce, +infra-dev ...

I agree w/ thakis@ that we shouldn't have a check without an auto-formatter.

However, there's also a difference between something that is auto-formatting (or checking the formatting) and something that is auto-rewriting, i.e., converting to the new format. 

Are we going to check that the DEPS files are in the new format (i.e., deps = {'foo': 'bar.git@DEADBEEF'} would fail)?

I wouldn't expect something called "format" to necessarily do that conversion, nor would I expect a formatting check to fail on the old format. I typically think of auto-formatters as things that are just adjusting whitespace and newlines.

Perhaps I'm being too pedantic, though?

-- Dirk


To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/infra-announce/CAMGbLiFt-Kbkx_PSJ7PRtMQi8TAG13jA%3DmgUsdhGHMnk%2BBpa6A%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "infra-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infra-dev+unsubscribe@chromium.org.
To post to this group, send email to infr...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/infra-dev/CAMGbLiFt-Kbkx_PSJ7PRtMQi8TAG13jA%3DmgUsdhGHMnk%2BBpa6A%40mail.gmail.com.

Aaron Gable

unread,
Apr 30, 2018, 12:25:17 PM4/30/18
to Dirk Pranke, Nico Weber, Edward Lemur, Edward Lesmes, infra-dev
Edward can explain in more detail if you like, but currently the plan is to:
1) Land the ability to format (including both converting old format to new, and just reformatting whitespace in files already in the new format)
2) Land the corresponding ability to check the format, for the sake of presubmits
3) For each existing file, switch it to the new format and enable the presubmit check at the same time
4) eventually, enable the presubmit and stricter parsing by default everywhere.

On Sat, Apr 28, 2018 at 2:53 PM Dirk Pranke <dpr...@chromium.org> wrote:
bcc infra-announce, +infra-dev ...

I agree w/ thakis@ that we shouldn't have a check without an auto-formatter.

However, there's also a difference between something that is auto-formatting (or checking the formatting) and something that is auto-rewriting, i.e., converting to the new format. 

Are we going to check that the DEPS files are in the new format (i.e., deps = {'foo': 'bar.git@DEADBEEF'} would fail)?

I wouldn't expect something called "format" to necessarily do that conversion, nor would I expect a formatting check to fail on the old format. I typically think of auto-formatters as things that are just adjusting whitespace and newlines.

Perhaps I'm being too pedantic, though?

-- Dirk


On Fri, Apr 27, 2018 at 6:23 AM, Nico Weber <tha...@chromium.org> wrote:
I'd suggest that the only way to presubmit-check for deps formatting is by auto-formatting them in the presubmit and checking that that's a no-op. Having a presubmit that checks for a certain formatting without a "run $x to auto-format" output seems like a step back from what we've achieved for all other languages we use -- they all print a command to fix formatting. So it's ok if the autoformatter takes some time, but presubmit-checking the formatting of deps files should be blocked on it existing.
On Wed, Apr 18, 2018 at 3:49 PM, Edward Lemur <ehmal...@google.com> wrote:
Yeah, it's something I want to look into, but it would probably take some time.
On Wed, Apr 18, 2018 at 11:06 AM Nico Weber <tha...@chromium.org> wrote:
Is `git cl format` going to do automatic formatting of DEPS files? That's the hook we use for formatting other file types (.cc, .gn, .xml, ...)
On Wed, Apr 18, 2018 at 12:47 PM, Edward Lesmes <ehmal...@chromium.org> wrote:
If you are not an OWNER of a DEPS file you can stop reading now.

I would like to change the way the DEPS files are formatted in a totally backwards compatible way. See here for details on the new format.

I’ve been developing tools to deal with DEPS files programmatically. However the wildly different ways to express dependencies in DEPS files makes this a hard task.
I would like to move towards a single unified format, totally backwards compatible, for all DEPS files, and possibly enable a PRESUBMIT check to enforce it with warnings.

I don’t expect this to cause any issues, since no support will be removed, but please let me know if you have any concerns, questions or comments.

Thank you!

--
You received this message because you are subscribed to the Google Groups "infra-announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infra-announc...@chromium.org.

To post to this group, send email to infra-a...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/infra-announce/CAJAfbwthomPdibkzMYDCc%2BtWgQnZ%3D4h%2BnsyEk_wYc7umqR%2BwOw%40mail.gmail.com.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAJAfbwthomPdibkzMYDCc%2BtWgQnZ%3D4h%2BnsyEk_wYc7umqR%2BwOw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "infra-announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infra-announc...@chromium.org.

To post to this group, send email to infra-a...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "infra-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infra-dev+...@chromium.org.

To post to this group, send email to infr...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "infra-announce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infra-announc...@chromium.org.

To post to this group, send email to infra-a...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "infra-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to infra-dev+...@chromium.org.

To post to this group, send email to infr...@chromium.org.

Edward Lemur

unread,
Apr 30, 2018, 12:55:24 PM4/30/18
to aga...@chromium.org, Dirk Pranke, Nico Weber, Edward Lesmes, infr...@chromium.org
I've updated the doc with the plan that Aaron outlined above :)
Reply all
Reply to author
Forward
0 new messages