telescope
telescope copied to clipboard
Fix for transpile on windows OS
https://github.com/cosmology-tech/telescope/issues/499
Fix for windows OS on telescope transpile
After some manual testing, i am getting this on codegen
, but it does build. Unsure if it a desired output. If you are able to point me to a direction. will fix this
export * from "./ics23\\bundle";
export * from "./cosmos_proto\\bundle";
export * from "./cosmos\\bundle";
export * from "./cosmwasm\\bundle";
export * from "./google\\bundle";
export * from "./ibc\\bundle";
export * from "./osmosis\\bundle";
export * from "./tendermint\\bundle";
After some manual testing, i am getting this on
codegen
, but it does build. Unsure if it a desired output. If you are able to point me to a direction. will fix thisexport * from "./ics23\\bundle"; export * from "./cosmos_proto\\bundle"; export * from "./cosmos\\bundle"; export * from "./cosmwasm\\bundle"; export * from "./google\\bundle"; export * from "./ibc\\bundle"; export * from "./osmosis\\bundle"; export * from "./tendermint\\bundle";
Hi, Thank you very much for the PR!
I think this's the place generating exports: https://github.com/cosmology-tech/telescope/blob/c79d977ddaea4e7f612b2482a088fecf2b779783/packages/telescope/src/generators/create-index.ts#L26C34-L26C34
So I guess we can see how 'path' will handle relative under windows. If the string with '\' is returned by 'relative', then I guess we can be fine with it. https://github.com/cosmology-tech/telescope/blob/c79d977ddaea4e7f612b2482a088fecf2b779783/packages/telescope/src/utils/index.ts#L105
Or if there's '\' in the f2, I think we can find where we create the dir string. I think it's here: https://github.com/cosmology-tech/telescope/blob/c79d977ddaea4e7f612b2482a088fecf2b779783/packages/telescope/src/bundle.ts#L42C32-L42C32
After some manual testing, i am getting this on
codegen
, but it does build. Unsure if it a desired output. If you are able to point me to a direction. will fix thisexport * from "./ics23\\bundle"; export * from "./cosmos_proto\\bundle"; export * from "./cosmos\\bundle"; export * from "./cosmwasm\\bundle"; export * from "./google\\bundle"; export * from "./ibc\\bundle"; export * from "./osmosis\\bundle"; export * from "./tendermint\\bundle";
Hi, Thank you very much for the PR!
I think this's the place generating exports: https://github.com/cosmology-tech/telescope/blob/c79d977ddaea4e7f612b2482a088fecf2b779783/packages/telescope/src/generators/create-index.ts#L26C34-L26C34
So I guess we can see how 'path' will handle relative under windows. If the string with '' is returned by 'relative', then I guess we can be fine with it.
https://github.com/cosmology-tech/telescope/blob/c79d977ddaea4e7f612b2482a088fecf2b779783/packages/telescope/src/utils/index.ts#L105
Or if there's '' in the f2, I think we can find where we create the dir string. I think it's here: https://github.com/cosmology-tech/telescope/blob/c79d977ddaea4e7f612b2482a088fecf2b779783/packages/telescope/src/bundle.ts#L42C32-L42C32
Thank you, I've managed to fix up the bundle.ts files and index.ts, but i am still bumping into undesired back slashes on other codegen files. Is there a more generalised entry point for the imports ? Or do i have to add a path replacer on each package ?
tendermint/abci/types.ts
import { Header, HeaderAmino, HeaderSDKType } from "..\\types\\types";
import { ProofOps, ProofOpsAmino, ProofOpsSDKType } from "..\\crypto\\proof";
import { EvidenceParams, EvidenceParamsAmino, EvidenceParamsSDKType, ValidatorParams, ValidatorParamsAmino, ValidatorParamsSDKType, VersionParams, VersionParamsAmino, VersionParamsSDKType } from "..\\types\\params";
import { PublicKey, PublicKeyAmino, PublicKeySDKType } from "..\\crypto\\keys";
import { Long } from "..\\..\\helpers";
tendermint/crypto/proof.ts
import { Long } from "..\\..\\..\\helpers";
export interface BitArray {
bits: Long;
elems: Long[];
}
Does this modify output of generated code? or just the ability to read the files via fs
?
Does this modify output of generated code? or just the ability to read the files via
fs
?
Currently its doing both,
for the ability to read files via fs
the splat must be converted to win pathing
const protoFiles = glob(convertIfWinPath(ToUnixPath, '/', protoSplat));
Due to the update to pathing the imports on codegen have been changed to use \\
instead of /
But it does not impact build
e.g.
import { Header, HeaderAmino, HeaderSDKType } from "..\\types\\types";
import { ProofOps, ProofOpsAmino, ProofOpsSDKType } from "..\\crypto\\proof";
import { EvidenceParams, EvidenceParamsAmino, EvidenceParamsSDKType, ValidatorParams, ValidatorParamsAmino, ValidatorParamsSDKType, VersionParams, VersionParamsAmino, VersionParamsSDKType } from "..\\types\\params";
import { PublicKey, PublicKeyAmino, PublicKeySDKType } from "..\\crypto\\keys";
import { Long } from "..\\..\\helpers";
@Zetazzz @pyramation any updates on this for any further changes i should make for this PR ?
fixed with #648