adobe / react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
https://react-spectrum.adobe.com
Apache License 2.0
13.04k stars 1.13k forks source link

Cyclic Dependancy Warning #7040

Closed Viraj-10 closed 2 months ago

Viraj-10 commented 2 months ago

Provide a general summary of the issue here

Getting cyclic dependency warnings due to @internationalized/date

λ  WARN  Require cycle: node_modules/@internationalized/date/dist/CalendarDate.main.js -> node_modules/@internationalized/date/dist/manipulation.main.js -> node_modules/@internationalized/date/dist/conversion.main.js -> node_modules/@internationalized/date/dist/CalendarDate.main.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
  factory (node_modules/@internationalized/date/dist/conversion.main.js:1:33)
  factory (node_modules/@internationalized/date/dist/manipulation.main.js:1:33)
λ  WARN  Require cycle: node_modules/@internationalized/date/dist/manipulation.main.js -> node_modules/@internationalized/date/dist/conversion.main.js -> node_modules/@internationalized/date/dist/manipulation.main.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
  factory (node_modules/@internationalized/date/dist/conversion.main.js:2:33)
  factory (node_modules/@internationalized/date/dist/manipulation.main.js:1:33)
λ  WARN  Require cycle: node_modules/@internationalized/date/dist/CalendarDate.main.js -> node_modules/@internationalized/date/dist/manipulation.main.js -> node_modules/@internationalized/date/dist/conversion.main.js -> node_modules/@internationalized/date/dist/GregorianCalendar.main.js -> node_modules/@internationalized/date/dist/CalendarDate.main.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
  factory (node_modules/@internationalized/date/dist/GregorianCalendar.main.js:1:33)
  factory (node_modules/@internationalized/date/dist/conversion.main.js:3:33)
λ  WARN  Require cycle: node_modules/@internationalized/date/dist/CalendarDate.main.js -> node_modules/@internationalized/date/dist/manipulation.main.js -> node_modules/@internationalized/date/dist/conversion.main.js -> node_modules/@internationalized/date/dist/GregorianCalendar.main.js -> node_modules/@internationalized/date/dist/utils.main.js -> node_modules/@internationalized/date/dist/CalendarDate.main.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
  factory (node_modules/@internationalized/date/dist/utils.main.js:1:33)
  factory (node_modules/@internationalized/date/dist/GregorianCalendar.main.js:2:33)
λ  WARN  Require cycle: node_modules/@internationalized/date/dist/conversion.main.js -> node_modules/@internationalized/date/dist/queries.main.js -> node_modules/@internationalized/date/dist/conversion.main.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
  factory (node_modules/@internationalized/date/dist/queries.main.js:1:33)
  factory (node_modules/@internationalized/date/dist/conversion.main.js:4:33)
λ  WARN  Require cycle: node_modules/@internationalized/date/dist/CalendarDate.main.js -> node_modules/@internationalized/date/dist/string.main.js -> node_modules/@internationalized/date/dist/CalendarDate.main.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
  factory (node_modules/@internationalized/date/dist/string.main.js:1:33)
  factory (node_modules/@internationalized/date/dist/CalendarDate.main.js:3:33)

🤔 Expected Behavior?

There shouldn't be any cyclic dependancy in modules.

😯 Current Behavior

💁 Possible Solution

Shared utilities should be separated.

No response

🔦 Context

No response

🖥️ Steps to Reproduce

Install @@internationalized/date in any expo app for web. you will see the warnings in the console.

Version

3.5.5

What browsers are you seeing the problem on?

Other

If other, please specify.

No response

What operating system are you using?

mac-os

🧢 Your Company/Team

gluestack-ui

🕷 Tracking Issue

https://github.com/gluestack/gluestack-ui/issues/2361

Viraj-10 commented 2 months ago
Screenshot 2024-09-16 at 4 03 52 PM

Here is a diagram for better understanding

snowystinger commented 2 months ago

Closing as a duplicate https://github.com/adobe/react-spectrum/issues/6394