phenixdigital / phoenix_storybook

A pluggable storybook for your Phoenix components.
MIT License
642 stars 49 forks source link

Elixir 1.17 warnings 0.6.2 and 0.6.1 #460

Closed elliottneilclark closed 3 weeks ago

elliottneilclark commented 1 month ago

When updating to elixir 1.17.0 on a project with v0.6.1, we saw the following errors:

 warning: using map.field notation (without parentheses) to invoke function Storybook.Components.Alert.aliases() is deprecated, you must add parentheses instead: remote.function()
  (phoenix_storybook 0.6.1) lib/phoenix_storybook/stories/story_validator.ex:148: PhoenixStorybook.Stories.StoryValidator.validate_component_aliases!/2
  (phoenix_storybook 0.6.1) lib/phoenix_storybook/stories/story_validator.ex:57: PhoenixStorybook.Stories.StoryValidator.validate_component!/1
  (phoenix_storybook 0.6.1) lib/phoenix_storybook.ex:119: anonymous fn/2 in PhoenixStorybook.story_compilation_quotes/2
  (elixir 1.17.0) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
  (elixir 1.17.0) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2

warning: using map.field notation (without parentheses) to invoke function Storybook.Components.Alert.aliases() is deprecated, you must add parentheses instead: remote.function()
  (phoenix_storybook 0.6.1) lib/phoenix_storybook/stories/story_validator.ex:156: PhoenixStorybook.Stories.StoryValidator.validate_component_imports!/2
  (phoenix_storybook 0.6.1) lib/phoenix_storybook/stories/story_validator.ex:58: PhoenixStorybook.Stories.StoryValidator.validate_component!/1
  (phoenix_storybook 0.6.1) lib/phoenix_storybook.ex:119: anonymous fn/2 in PhoenixStorybook.story_compilation_quotes/2
  (elixir 1.17.0) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
  (elixir 1.17.0) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2

warning: using map.field notation (without parentheses) to invoke function Storybook.Components.Alert.template() is deprecated, you must add parentheses instead: remote.function()
  (phoenix_storybook 0.6.1) lib/phoenix_storybook/stories/story_validator.ex:190: PhoenixStorybook.Stories.StoryValidator.validate_component_template!/2
  (phoenix_storybook 0.6.1) lib/phoenix_storybook/stories/story_validator.ex:60: PhoenixStorybook.Stories.StoryValidator.validate_component!/1
  (phoenix_storybook 0.6.1) lib/phoenix_storybook.ex:119: anonymous fn/2 in PhoenixStorybook.story_compilation_quotes/2
  (elixir 1.17.0) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
  (elixir 1.17.0) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2

When updating to elixir 1.17.0 and v0.6.2, we see the following error:

warning: using map.field notation (without parentheses) to invoke function Storybook.Components.Alert.template() is deprecated, you must add parentheses instead: remote.function()
  (phoenix_storybook 0.6.1) lib/phoenix_storybook/stories/story_validator.ex:190: PhoenixStorybook.Stories.StoryValidator.validate_component_template!/2
  (phoenix_storybook 0.6.1) lib/phoenix_storybook/stories/story_validator.ex:60: PhoenixStorybook.Stories.StoryValidator.validate_component!/1
  (phoenix_storybook 0.6.1) lib/phoenix_storybook.ex:119: anonymous fn/2 in PhoenixStorybook.story_compilation_quotes/2
  (elixir 1.17.0) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
  (elixir 1.17.0) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
jsonmaur commented 1 month ago

See https://github.com/phenixdigital/phoenix_storybook/pull/461

cblavier commented 3 weeks ago

merged and released in 0.6.3