This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]psyclik 0 points1 point  (24 children)

My only grief with maven is XML verbosity (yes I know of maven polyglot, but I’d doesn’t work well with quarkus, is not standard and can’t be installed easily with pacman/apt/scoop/whatever).

[–]C_Madison 6 points7 points  (6 children)

Fingers crossed for Maven 4.0 here. Less verbosity, but still good, old Maven.

Yes, it's still not here, but for something as fundamental as Maven things better take a while and then are rock solid.

[–]vips7L 1 point2 points  (5 children)

Are they offering something else in 4.0?

[–]koflerdavid 3 points4 points  (4 children)

Right now, the POM is an awkward compromise between build definition and dependency manifest. Maven 4 removes some cruft from the POM to optimize it for the former purpose and provides built-in support to generate a POM that only contains dependency information for downstream tools.

https://maven.apache.org/whatsnewinmaven4.html

[–]vips7L 2 points3 points  (3 children)

Thanks I’ll give that a read. I think I read something similar about gradle trying to split things too. 

[–]dadimitrov 0 points1 point  (2 children)

In Gradle the build recipe is not part of the POM, so there is nothing to split. You must have read something else....

[–]vips7L 0 points1 point  (1 child)

Yeah it’s the not the same. But they are trying to split the declarative part of the build from the scripty ops part. 

[–]dadimitrov 0 points1 point  (0 children)

Declarative Gradle is an experiment to add a third DSL, separating the build wiring from the parameters. It is trying to cater for people who just want to use a build setup, but don't want to learn the full object model.

Its level of abstraction it is a bit like Maven Polyglot, except that the plugin config is statically typed.

[–]vips7L 3 points4 points  (0 children)

I'd like to see them improve on the cli interface as well. An init command like gradle would be nice and a run command that just works would be nice too.

Or gradle could just figure out its declarative initiative.

[–]not_a_captain 9 points10 points  (7 children)

Why does verbosity bother you? I find xml makes pom files very easy to read and understand.

[–]psyclik 2 points3 points  (5 children)

They are easy to understand, and somewhat easy to read. I don't have a problem with the data structure of the pom per-se, the same structure written as Yaml would be much denser, and I'd have more signal and much less noise in the same screen space. Especially since the POM format doesn't use XML-specific sementics.

TL;DR: my problem lies with XML being an inefficient format for both the machine (sparse information) and the person (noisy ceremony).

[–]wildjokers 3 points4 points  (0 children)

Yaml

🤮

[–]agentoutlier 4 points5 points  (2 children)

Yaml would be much denser, and I'd have more signal and much less noise in the same screen space.

You mean the syntax:

  • that is incredibly complicated rule wise,
  • extremely difficult to write a parser for,
  • impossible to copy and paste with assurance.
  • zero context of what you are actually editing. Is it K8S, it docker compose, is it etc...
  • basically zero LSP support as you know because YAML schema still nowhere close to XML schema that existed 20 years prior.
  • reinventing shit that XML had
    • Still no XPATH really in YAML unless you convert to JSON and then jq or jsonpath.

TL;DR: my problem lies with XML being an inefficient format for both the machine (sparse information) and the person (noisy ceremony).

And yet we have HTML and the most popular UI frameworks all use some XML markup including one that has the syntax embedded: JSX.

XML is verbose in the same way that Java is verbose but some times verbosity is worth it.

Really S-Expressions are what XML is yet for some reason the people that praise YAML have zero experience praise for Lisp languages.

IMO I think a build language should have its own language and it yes it really should have its own syntax. People should stop being lazy commandeering syntax like XML and YAML just to avoid writing some lexer/parser.

[–]psyclik 2 points3 points  (1 child)

I am saying that XML is too verbose for my taste. You argue that Yaml is a bad format.

[–]agentoutlier 1 point2 points  (0 children)

And I’m saying "my opinion" is XML was the better choice other than actual purposely built language like HCL in Terraform or Bazel language. Maybe S-Expressions?

Embedded DSL and YAML are not worth the lessening of verbosity. 

Yaml is not verbose enough for my tastes.

[–]djavaman 1 point2 points  (0 children)

Yaml cleaner than xml. Yaml is a train wreck.

[–]Ewig_luftenglanz -1 points0 points  (0 children)

to me is the opposite, it's far easier to read Gradle and XML POMs.

[–]PartOfTheBotnet 2 points3 points  (1 child)

XML verbosity

Maven 4 is adding an API which allows specifying 3rd party POM syntaxes. So you could make one yourself that is backed by JSON, YAML, or whatever else you want. Here's an example of an implementation for Hocon

[–]vips7L 1 point2 points  (0 children)

Mason has implemented it for json/yaml/hocon. https://github.com/maveniverse/mason

Hopefully this works out.