Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make client thin #955

Open
cstamas opened this issue Apr 20, 2024 · 1 comment
Open

Make client thin #955

cstamas opened this issue Apr 20, 2024 · 1 comment

Comments

@cstamas
Copy link
Member

cstamas commented Apr 20, 2024

Currently there is some heavy logic in client, but IMHO it is superfluous.
Instead, make client thin as possible:

  • it should collect all maven config and create "seed" (ie. by hashing these things opaquely)
  • based on "seed" select (or start) a daemon
  • it should collect CWD and CLI params and send those those to daemon
  • sit and wait, and let m39, m40, mXX decide what it likes or dislikes out of params
@gnodet
Copy link
Contributor

gnodet commented Apr 20, 2024

The goal is to fully respect what the user environment as usually loaded by maven.

The compatibility is defined by two simple things:

  • the JVM path (a String)
  • a list of options (List<String>)
    The list of options is known as discriminating options. Those are options that actually make the daemon different and thus needs a different daemon.
    So we can definitely compute a hash of those strings, but that won't really simplify things, as the tricky part is to list and gather those options, not to compare those. See
    private final Path javaHome;
    private final List<String> options;

For point #3, I think that's what the client roughly does. Why would that be different ? Here's what is sent to the daemon:

final List<String> args;
final String workingDir;
final String projectDir;
final Map<String, String> env;

Not sure to understand #4...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants