-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
-i
and --no-server
gets ignored with no error when passed as the second option (200USD Bounty)
#2869
Comments
This is strange. We had such a warning in 0.10. I thought we removed this requirement (to have them in first position) as we now have a single entry point to Mill (so we can parse the full cmdline), and probably have removed the warning along this way. We need to have a deeper look... |
Hm... changing Also, if the first argument spot ends up no longer being enforced for these options, it'd be helpful to remove the corresponding sentence from the |
I completely agree. I'll mark this issue a bug once I have a better idea what's going on. |
Looks like the requirement to have it in first position is still there.
So I was wrong. We need to fix the missing warning. Thanks for reporting. |
Hm, we have it here: mill/runner/src/mill/runner/MillMain.scala Lines 134 to 136 in c12d024
|
Hm. Then it seems it just isn't being printed for some reason... |
Mill should stop right away, when this branch in entered. So I think the condition is no longer true. Most likely the |
I think Mill learned to use the system IN even when in server mode, so we can't no longer detect if if we run in a server or not by checking for a |
@alastor1729 I'm happy to help if you need pointers. Feel free to ask here, or we can schedule a call or something if you want to discuss it synchronouslhy |
Hi @lihaoyi, I just sent you a "30 mins Google Meeting call" for us to discuss Issue synchronously && ask for pointers:
|
-i
and --no-server
gets ignored with no error when passed as the second option-i
and --no-server
gets ignored with no error when passed as the second option (200USD Bounty)
Any news on that topic? Did you decide on any implementation detail? If not, I see two options, and it's unclear to me, what the envisioned goal of this ticket is
|
As a side note, I envision some native launcher instead of the current solutions (which could be either Scala Native or Graal VM) and fall back to some less performant but singleton handling of these options in case we can't use a native launcher. Hopefully reducing the scattered logic in multiple places. Scala Native looks more straight forward, as it could share code with the non-native runner, but I don't think our current library used for the client-server communication, It looks like Unfortunately, I don't have experience in both of these. |
@lefou, due to my work-constraints && work-deadlines (for the near future), and through email communication with @lihaoyi...
|
From the maintainer Li Haoyi: I'm putting a 200USD bounty on this issue, payable by bank transfer on a merged PR fixing this.
-i
should raise an error when not passed as the first argument, because it can only take effect when it is first, and passing it as a later argument is a easy footgun that we should give a good error message to help people avoidBoth
-i
and--no-server
options require to be the first argument, but no error seems to be produced if they're passed elsewhere.This caused my team a major headache when
--disable-callgraph-invalidation
has been added to the Scala CLI mill script as the first argument (attempted workaround for #2844), with-i
sneakily being ignored everywhere as a result, with no failures.I'd at the very least expect a warning, and preferably just an error.
The text was updated successfully, but these errors were encountered: