-
Notifications
You must be signed in to change notification settings - Fork 121
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
Relative imports don't work in upward direction #73
Comments
link to the same issue on blueprint ton-org/blueprint#59 |
Please, specify your OS |
Also i am using |
If you need a hand in adding this feature just let me know where should i start. |
d0rich
added a commit
to d0rich/esprit
that referenced
this issue
Nov 12, 2023
d0rich
added a commit
to d0rich/esprit
that referenced
this issue
Nov 22, 2023
* Init contracts project * Only one contracts repository * Init new contracts * Copy draft nft contracts * Move NFT functionality to the traits * Fix build errors * Restructure contracts, becuase upward import doesn't work tact-lang/tact#73 * Update node and fix lock file * Build contracts before test * Lint and test in single job * Temporary hide tests * Add build script * Leave only one test * Implement accounting trait * Implement royalty extention * Extraxt logic from transfer reciever * Move get functions to the top * Add custom function to get individual content for NFT item. * Add getNftCollectionContent function to NftCollection trait * Refactor accounting functions to use more descriptive names * Add virtual function to calculate NFT item initial balance. * Add requireEnoughTonForMinting function to NftCollection trait * Fix semicolon in calculateNftItemInitalBalance() function * Refactor DSocialNetworkAccount and NftCollection to use owner instead of owner_address * Master contract draft * Fix build errors * Handle NFT custom internal content * Handle account initialization * Fix account registration * Group NFT messages * Try to store metadata on chain * Use emptyMap() for map initialization * Test accounts registration * Create tests specifically for the account * Change account parameters * Create post * Deploy test post to test how it looks like on getgems * Add master contract address to account info * Update social links to be stored as a JSON string * Update metadata arrays to use empty cells instead of JSON strings * Refactor metadata arrays to use empty cells * Store metadata in JSON string * Don't convert metadata to cell * Reuse similar messages * v0.0.1-metadata-as-struct-no-convertation-to-cell * v0.0.1-metadata-as-cells * v0.0.1-no-maps-in-metadata * Test parser for onchain metadata * Correctly serialize metadata with native functions * Correctly serialize dict fields * Serialize nft content in collection * Serialize nft collection metadata * Prevent NFT serialiozation from other collections * Add index validation in serializeNftContent function * Return standard metadata in 1 cell * Update version and remove content_url * Init d entities models * Serialize post metadata to description * Rework tests * Refactor serialization of individual content in NftItem trait * Refactor serializeIndividualContent function to remove unnecessary map initialization * Comment test affected by library ton-org/ton-core#16 * Resolve BitBuilder overflow issue ton-org/ton-core#16 * Slightly refactor test * Refactor DPost content field to contentMd * Init d.d0rich.me * Move models to frontend * lintfix * Refactor ignore-build.mjs files * Add build task for d.d0rich.me * Patch contracts wrappers imports * Add eslint-disable to new-imports.ts * Update DPostModel import in test-fixtures.ts * Rename account to blog * Update function name to get_blog_info() * Refactor blog initialization to use blog metadata * Add static covers images * Add manifest file and update favicon.ico * Fix sending amount calculation in contracts * Fix initialization and editing of blog and post metadata * Include additional fees for actions * Add StorageController trait to contracts * Update version to v1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am encountering issues with relative imports, which don't seem to function intuitively, especially when I try to import files from a different directory. When I import files from the same directory using the syntax
import "./other_file.tact";
, everything operates smoothly. However, problems emerge when I attempt to import files from a parent or sibling directory with the syntaximport "../other_file.tact";
.I have an extensive folder structure with many contracts, and my goal is to share some utility files among them while adhering to a standard folder structure. My folder structure is organized as follows:
I aim to maintain this structure while facilitating the sharing of utility files across different contracts. However, the relative import issues are preventing me from achieving this. Question is: Can we achieve such imports in tact?
The text was updated successfully, but these errors were encountered: