mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2026-03-01 04:28:51 +00:00
Divide large code files into smaller ones #1389
Labels
No labels
I1
I2
I3
I4
S1
S2
S3
S4
U0
U1
U2
U3
U3
U4
blocked
bug
bug
cli
compiler
config
config
consensus
dependencies
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
neotest
network
oracle
performance
question
rpc
security
smartcontract
task
task
task
test
vm
wallet
windows
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neo-go#1389
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lock9 on GitHub (Oct 14, 2024).
Is your feature request related to a problem? Please describe.
Some files in the project, like
blockchain.go, are too large for most AI models. With over 3,000 lines, it can't be directly 'pasted' into ChatGPT. I had to debug neo-go to get some things working, and locating what I needed was challenging.Note: I don't intend to change any structure, just to 'split source code files into smaller chunks.'
Describe the solution you'd like
Split
blockchain.gointo smaller files (and possibly other large files as well).Describe alternatives you've considered
Additional context
This is primarily a structural improvement to the code. It shouldn't affect the expected behavior. My tool already splits the file into smaller parts before sending it to ChatGPT, but this consumes far more API credits than necessary, and the responses are often inaccurate or incomplete. Having a 'human' divide the code will help the AI avoid mistakes.
@roman-khimov commented on GitHub (Oct 14, 2024):
Likely these tools will be upgraded before we do this and it's hard for me to accept the idea of changing something in the code for tools that are supposed to be eating petabytes of data for breakfast. But I admit
blockchain.goand RPC'sserver.goare not easy to navigate through for humans as well, so some refactoring can still be beneficial.@lock9 commented on GitHub (Oct 14, 2024):
These were the files that I 'struggled' the most:
dao.gorpcsrv/server.goblockchain.goNote: Having several files with the same name also made me get lost a few times (now that I know which one to use)
