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

[core] Deprecate LicenseInfo reexports #11956

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

cherniavskii
Copy link
Member

Closes #11942

@cherniavskii cherniavskii added component: data grid This is the name of the generic UI component, not the React module! component: pickers This is the name of the generic UI component, not the React module! deprecation New deprecation message v7.x labels Feb 6, 2024
@mui-bot
Copy link

mui-bot commented Feb 6, 2024

Deploy preview: https://deploy-preview-11956--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 3e64f35

@flaviendelangle
Copy link
Member

Should we mention it in the migration guide or should we wait for its removal (in v8 I guess)?

@cherniavskii
Copy link
Member Author

Should we mention it in the migration guide or should we wait for its removal (in v8 I guess)?

I don't think so, deprecation message should be enough for now

@cherniavskii cherniavskii merged commit 9422d67 into mui:next Feb 6, 2024
21 checks passed
@cherniavskii cherniavskii deleted the deprecate-license-reexports branch February 6, 2024 15:41
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't be against a runtime warning, but maybe it's pushing it too far 😄

Comment on lines +3 to +10
export {
/**
* @deprecated
* Use `@mui/x-license` package instead:
* import { LicenseInfo } from '@mui/x-license';
*/
LicenseInfo,
} from '@mui/x-license';
Copy link
Member

@oliviertassinari oliviertassinari Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't generate IntelliSense for me.

Actual:

How about?

Suggested change
export {
/**
* @deprecated
* Use `@mui/x-license` package instead:
* import { LicenseInfo } from '@mui/x-license';
*/
LicenseInfo,
} from '@mui/x-license';
import { LicenseInfo as LicenseInfoExport } from '@mui/x-license';
/**
* @deprecated Use `@mui/x-license` package instead: import { LicenseInfo } from '@mui/x-license';
*/
export const LicenseInfo = LicenseInfoExport;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I couldn't figure it out!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flaviendelangle
Copy link
Member

IMHO if we add a runtime warning, then we should add it properly on the migration guide because people would be almost forced to migrate (I don't want to stay with a warning in dev everytime I work on my app).

I see 2 ways of approaching this:

  1. We do everything now: deprecate + runtime warning + migration guide
  2. We only deprecate in the code, and in a few months we add a runtime warning

@oliviertassinari
Copy link
Member

@flaviendelangle the smoother path makes sense, no need to rush it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! component: pickers This is the name of the generic UI component, not the React module! deprecation New deprecation message v7.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] Remove the exports for license utils from the data grid folder
5 participants