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

Fix #1745 - Throw on multiple configs #1885

Merged
merged 3 commits into from Dec 6, 2023
Merged

Fix #1745 - Throw on multiple configs #1885

merged 3 commits into from Dec 6, 2023

Conversation

WebReflection
Copy link
Contributor

@WebReflection WebReflection commented Dec 5, 2023

Description

This MR fixes #1745 by throwing errors in these conditions:

  • multiple <py-config> or <mpy-config> found on the page
  • both <py-config> and <script type="py" config="file.toml"> found on main
  • different <script type="py" config="a.toml"> and <script type="py" config="b.toml"> configs found on main

TODO

  • add integration tests once agreed this is currently what we want, as the discussion never had an OK

Changes

  • make the config crawler more greedy to prevent possible errors later on
  • add smoke tests to verify all cases are covered

Checklist

  • All tests pass locally
  • I have updated CHANGELOG.md
  • I have created documentation for this(if applicable)

Copy link
Contributor

@fpliger fpliger left a comment

Choose a reason for hiding this comment

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

lgtm! 👍

@WebReflection WebReflection merged commit b0377cc into pyscript:main Dec 6, 2023
3 checks passed
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.

[Next] Behavior when multiple configs on page (Show Warning?)
2 participants