Skip to content

fix/provided via#2151

Merged
amitu merged 8 commits intomainfrom
fix/provided-via
Jun 16, 2025
Merged

fix/provided via#2151
amitu merged 8 commits intomainfrom
fix/provided-via

Conversation

@siddhantk232
Copy link
Contributor

@siddhantk232 siddhantk232 commented Jun 16, 2025

Came across a few issues when trying to get https://www.fifthtry.com/ide/folio-frame/ package to work (anyone can download the source of this package from https://www.fifthtry.com/folio-frame.zip).

Especially the case where you try to import design-system.fifthtry.site in ds.ftd. This previously working during my testing is probably because of the state of RequestConfig::module_package_map. Basically, during the import resolution process, it tries every dependency for a module until it finds the right one. This process leaves the module_package_map with Package for inherited- caller_module that is not the main package. We catch this early and if the caller_module starts with inherited- then we use the main package name instead (similar to what we did for resolution of an import target).

When resolving import for the provided-via module (internally prefixed with inherited-), only the main package is checked now, instead of checking the "current package" (which is determined based on caller module path)

Also fixes the http processor to preserve the old behaviour of sending unquoted string values in url query parameter.

The `get_and_resolve` method is only needed when `use-config-json`
feature is not used.
This fixes at least the case where you try to import
`design-system.fifthtry.site` inside of a `ds.ftd` file which is given
to the provided-via of design-system package imported as a dependency in
your package.
@siddhantk232 siddhantk232 requested a review from amitu June 16, 2025 12:41
Calling `serde_json::to_string` on a `serde_json::Value::String`
produces a quoted string which is a valid json value but not what we
want to put inside url query params. To handle this, we check if the
value is a String and use the inner string value if it is. In all other
situations we want a safely escaped json value that we can decode on the
other side (ft_sdk).
amitu
amitu previously approved these changes Jun 16, 2025
@amitu amitu merged commit fc6c4e4 into main Jun 16, 2025
1 check passed
@amitu amitu deleted the fix/provided-via branch June 16, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants