8000 fix(least_squares): Wrap unsafe cast in trusted by Geod24 · Pull Request #23 · libmir/mir-optim · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(least_squares): Wrap unsafe cast in trusted #23

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

Merged
merged 3 commits into from
May 26, 2025
Merged

Conversation

Geod24
Copy link
Contributor
@Geod24 Geod24 commented May 25, 2025

Buildkite is hitting this issue:

source/mir/optim/least_squares.d(242,6): Error: `@safe` function `mir.optim.least_squares.__unittest_L219_C7` cannot call `@system` function `mir.optim.least_squares.__unittest_L219_C7.optimize!((x, y)
--
  | {
  | y[0] = x[0];
  | y[1] = 2 - x[1];
  | }
  | , (x, J)
  | {
  | J[0, 0] = 1;
  | J[0, 1] = 0;
  | J[1, 0] = 0;
  | J[1, 1] = -1;
  | }
  | , null, double).optimize`
  | )(settings, 2, x, l, u);
  | ^
  | source/mir/optim/least_squares.d(176,15):        and cast from `immutable(Exception)` to `object.Exception` makes it fail to infer `@safe`
  | throw cast()leastSquaresException_maxIterations;
  | ^

Geod24 added 3 commits May 25, 2025 19:55
Not a great thing to do since it breaks the typesystem but at least
Buildkite will pass again, as it is currently broken following
yesterday's release.
@Geod24
Copy link
Contributor Author
Geod24 commented May 25, 2025

@9il
Copy link
Member
9il commented May 26, 2025

Thank you!

@9il 9il merged commit 4123568 into libmir:master May 26, 2025
1 check passed
@9il
Copy link
Member
9il commented May 26, 2025

v2.0.8

@Geod24 Geod24 deleted the mlang/Fix branch May 26, 2025 07:40
@Geod24
Copy link
Contributor Author
Geod24 commented May 26, 2025

@9il : I don't see the commit on master, and v2.0.8 is on the same commit as v2.0.7 so I think you accidentally reverted this.

@9il
Copy link
Member
9il commented May 26, 2025

omg, sorry about that, v2.0.9

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

Successfully merging this pull request may close these issues.

< 35FD /development-menu>
2 participants
0