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

ManifoldCAD docs update #446

Merged
merged 3 commits into from
Jun 1, 2023
Merged

ManifoldCAD docs update #446

merged 3 commits into from
Jun 1, 2023

Conversation

elalish
Copy link
Owner

@elalish elalish commented Jun 1, 2023

We made a breaking change in #440 to pull the static methods up into module.Manifold, which I think is the right call, but this breaks people's existing scripts in ManifoldCAD.org. I decided to add back in the bare manifold constructors so that those scripts will still run, though I did not add them back into the .d.ts. This means they get a red error telling them to update while their script still runs - this feels like a reasonable compromise for now. Nevermind, I should have tested first. This isn't an option because we get redefinition errors. Now I'm just updating the intro docs.

@elalish elalish requested a review from geoffder June 1, 2023 16:55
@elalish elalish self-assigned this Jun 1, 2023
@geoffder
Copy link
Collaborator

geoffder commented Jun 1, 2023

Seems like an easy way to quasi-deprecate those functions being at the top-level.

Is the goal to eventually drop these out of the top-level again? If so do you think a notice with a timeline to removal would be necessary, or just give people some time with the annoying red squigglies?

This reverts commit 5f102e5.
@pca006132
Copy link
Collaborator

Interesting, why is there redefinition error? Can you show the error message and the exact location throwing the error? (too lazy to turn on my computer)

@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (cbfeed1) 89.67% compared to head (f6698c2) 89.67%.

❗ Current head f6698c2 differs from pull request most recent head 9d04423. Consider uploading reports for the commit 9d04423 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #446   +/-   ##
=======================================
  Coverage   89.67%   89.67%           
=======================================
  Files          35       35           
  Lines        4243     4243           
=======================================
  Hits         3805     3805           
  Misses        438      438           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@elalish
Copy link
Owner Author

elalish commented Jun 1, 2023

It's because we now want to use the pattern e.g. const {cube} = Manifold, but if I've already defined cube = Manifold.cube inside of the worker, then JS won't allow you to redefine cube. I was going to try to add a QuickFix in Monaco to help deal with it, but their documentation is very sparse, so I think it's not worthwhile. I guess we'll just hope Monaco's auto-completion will help guide people to the solution.

@elalish elalish changed the title Backward compat ManifoldCAD docs update Jun 1, 2023
@elalish elalish merged commit e024edf into master Jun 1, 2023
@elalish elalish deleted the backwardCompat branch June 1, 2023 17:31
@geoffder
Copy link
Collaborator

geoffder commented Jun 1, 2023

I think people will be able to figure it out. Pretty quick fix to add one line at the top to cover all of the used constructors as well.

cartesian-theatrics pushed a commit to SovereignShop/manifold that referenced this pull request Mar 11, 2024
* fix back compat

* updated docs

* Revert "fix back compat"

This reverts commit 5f102e5.
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.

3 participants