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

python: nuget packages with hypens in their names cause import errors #3875

Closed
joprice opened this issue Jul 31, 2024 · 0 comments · Fixed by #3900
Closed

python: nuget packages with hypens in their names cause import errors #3875

joprice opened this issue Jul 31, 2024 · 0 comments · Fixed by #3900

Comments

@joprice
Copy link
Contributor

joprice commented Jul 31, 2024

Description

When generating python for a package like thoth-json-codec, the hypens rename in the package name, which triggers a syntax error:

 from fable_modules.thoth-json-codec.codec import (Codec_map, Codec_array, Codec_1, CodecRequireQualifiedAccess_Codec_string, CodecRequireQualifiedAccess_Codec_int)

Expected and actual results

Package names containing hyphens could be escaped as periods are:

  • Thoth.Json.Core -> thoth_json_core
  • thoth-json-codec -> thoth_json_codec

Mapping these symbols to the same character of underscore would prevent having two dependencies that only differ in symbols, so maybe another valid character could be chosen if it is a concern.

Related information

  • Fable version: 4.19.3
  • Operating system: OSX
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 a pull request may close this issue.

1 participant