-
Notifications
You must be signed in to change notification settings - Fork 46
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
Exports to <object><ref>Mod
rather than <object>Mod
#555
Comments
javascript people are still javascript people I see. those names are from typescript - you can use those in typescript and it'll compile! I added the package locally, and export { a as app } from './app-5190a154.js';
export { c as cli } from './cli-373e13ed.js';
export { c as clipboard } from './clipboard-79413165.js';
export { d as dialog } from './dialog-20ff401c.js';
export { e as event, w as window } from './event-41a9edf5.js';
export { f as fs } from './fs-6ad2a328.js';
export { g as globalShortcut } from './globalShortcut-003b7421.js';
export { h as http } from './http-43c39402.js';
export { n as notification } from './notification-6cd45c32.js';
export { p as path } from './path-c062430b.js';
export { p as process } from './process-63838be1.js';
export { s as shell } from './shell-efff51a2.js';
import { i as invoke$1 } from './tauri-605fa63e.js';
export { t as tauri } from './tauri-605fa63e.js';
export { u as updater } from './updater-f9814f36.js';
export { o as os } from './os-650909c3.js'; ST follows code referred from The reason why this has to be done is that many popular packages package up to a dozen versions of the same library in the same gzip file. and importing a dozen similar-but-has-different-module-names hierarchies of code makes compile time and automatic naming suffer a lot. Choosing which files to import is actually quite hard. as such, this is probably the same thing as #463, #488. You see there is a PR, so this is going to be solved eventually. I'm working on another project now, it'll be later in autumn that I have time to return to ST :) in the meantime I guess manually change typescript or the generated code and distribute it as a jar may be a good path forward |
you could also provide a rename in your project of course, something like object mytauri {
val nicename = uglyname
} and import from there instead |
this really shouldn't be needed. the digest part of the file name ensures that the generated source code is the same, and the only difference from there and out is what scalac does. |
Thank you for the swift response!
Thanks! That helps understanding the issue a bit better! I did not consider checking the contents of If the converter relies solely on the JS files under Managed to reproduce the inconsistent
I do not mean to drag you to this rabbit-hole, I apreciate the help! Regarding the workaround, it seems that it is almost working:
The code is compiling but now files
At this point, I am too concerned making manual changes to the JS files given the nature of the error. Do you have a suggestion?
I understand but can't explain. Not worthwhile revisiting this topic given that I am still in discovery mode. I suppose that, if it does not rely on the content of the files, I need to manually recompile if I manually modify the files (really trying to avoid that). [1] export { a as app } from './app-5190a154.js';
export { c as cli } from './cli-373e13ed.js';
export { c as clipboard } from './clipboard-79413165.js';
export { d as dialog } from './dialog-20ff401c.js';
export { e as event, w as window } from './event-41a9edf5.js';
export { f as fs } from './fs-6ad2a328.js';
export { g as globalShortcut } from './globalShortcut-003b7421.js';
export { h as http } from './http-43c39402.js';
export { n as notification } from './notification-6cd45c32.js';
export { p as path } from './path-c062430b.js';
export { p as process } from './process-63838be1.js';
export { s as shell } from './shell-efff51a2.js';
import { i as invoke$1 } from './tauri-605fa63e.js';
export { t as tauri } from './tauri-605fa63e.js';
export { u as updater } from './updater-f9814f36.js';
export { o as os } from './os-650909c3.js';
/**
* The Tauri API allows you to interface with the backend layer.
*
* This module exposes all other modules as an object where the key is the module name, and the value is the module exports.
* @example
* ```typescript
* import { app, dialog, event, fs, globalShortcut } from '@tauri-apps/api'
* ```
* @module
*/
/** @ignore */
declare const invoke: typeof invoke$1;
export { invoke }; [2] /**
* The Tauri API allows you to interface with the backend layer.
*
* This module exposes all other modules as an object where the key is the module name, and the value is the module exports.
* @example
* ```typescript
* import { app, dialog, event, fs, globalShortcut } from '@tauri-apps/api'
* ```
* @module
*/
export * from './bundle'; What in turn import 'regenerator-runtime/runtime';
import * as app from './app';
import * as cli from './cli';
import * as clipboard from './clipboard';
import * as dialog from './dialog';
import * as event from './event';
import * as fs from './fs';
import * as globalShortcut from './globalShortcut';
import * as http from './http';
import * as notification from './notification';
import * as path from './path';
import * as process from './process';
import * as shell from './shell';
import * as tauri from './tauri';
import * as updater from './updater';
import * as window from './window';
import * as os from './os';
/** @ignore */
declare const invoke: typeof tauri.invoke;
export { app, cli, clipboard, dialog, event, fs, globalShortcut, http, notification, path, process, shell, tauri, updater, window, os, invoke }; [3]
|
Hello,
The converter is exporting Tauri's
dialog
interface (https://tauri.app/v1/api/js/dialog) todialog20ff401cMod
rather than justdialogMod
. In which situations does this occur and how can I avoid it?Context
I am unable to find the culprit. I thought it was related to a dependency bump or the addition of
stFlavour := Flavour.ScalajsReact
but it might not be it. I was able to bump and build the frontend of the following sample project[1] using the latest versions (tested usingsbt buildFrontend
):1.9.2
1.0.0-beta42
1.13.2
3.3.0
Saying might not be it because I applied the same changes to a separate project using a different
stOutputPackage
and now I am unable to compile. Is that related?I am pretty sure that I am missing something and after several hours my mind is playing tricks on me. I am hopeful that there is simple explanation.
Notes
Reproducing the issue is confusing as it seems that I need to clean-up files between each conversion (see [2])? I followed the cache path mentioned in the docs.
Plus, without looking at the source-code, it is unclear where the
20ff401c
comes from (doesn't match a git SHA).Thank you!
[1]
[2]
The text was updated successfully, but these errors were encountered: