Closed danfercf1 closed 2 weeks ago
Hi @danfercf1 this is a really well explained plan for migration to TS, I think we need to keep improving the project and make it more readable for new contributors and at the same time more sustainable over time.
@knocte could you read it ? what do you think about it?
@grunch hey,
I like the optimism at display here, and I don't disagree with any of the points.
But before I give my opinion on the JS->TS task, can @danfercf1 please explain why is this github issue mentioning 3 things at the same time? Why not separate them? I don't understand why they need to be together.
@grunch hey,
I like the optimism at display here, and I don't disagree with any of the points.
But before I give my opinion on the JS->TS task, can @danfercf1 please explain why is this github issue mentioning 3 things at the same time? Why not separate them? I don't understand why they need to be together.
It's just to keep in mind the tasks to do, I think the addition of configurations for vscode debugger isn't related but it's a small change and shouldn't affects all the process, by the way it could be another task or feature to be added in order to have more atomic tasks
I think the addition of configurations for vscode debugger isn't related but it's a small change
If it's a small change, the more reason to split it into a different issue, which can be fixed by a specific PR that only fixes that!
it could be another task or feature to be added in order to have more atomic tasks
Yes let's keep tasks as small as possible, no need to munge together a bunch of things like if we were product managers. We're all developers here.
I agree with split it into smaller issues, I'm having head aches testing big PRs on this project 😢
Approved this request, and as we commented let's split this into several issues, as we are receiving donations we currently have budget to support the work of collaborators, for this one we have 500k sats for the whole work, @danfercf1 are you able to take this one? you have priority to be assigned as it was your idea, @knocte we have sats for you as a reviewer or developer too.
Yes, I'm interested on it, I will split the tasks into other ones
@knocte we have sats for you as a reviewer or developer too.
Ah thanks, and will I be able to re-invest these sats to pay other contributors to fix other things?
let's split this into several issues
Yeah, I see 3 things so 3 issues?
Approved this request
BTW I'm surprised you "approved" this, given that 1 of those 3 issues would be "finish converting from JS to TS", and wouldn't this task in itself need to be split in many other issues? Especially given the fact that me, webwarrior and Mershad have been trying this for several months and we're finding that it's not that easy to convert without finding regressions (so the smaller the conversion the better).
@knocte we have sats for you as a reviewer or developer too.
Ah thanks, and will I be able to re-invest these sats to pay other contributors to fix other things?
Yes I wan to give away donations to contributors, we have this rewards board here
https://github.com/orgs/lnp2pBot/projects/2/
And also I want to give back to you, webwarrior and mershad for all the work you have done and keep doing.
Approved this request
BTW I'm surprised you "approved" this, given that 1 of those 3 issues would be "finish converting from JS to TS", and wouldn't this task in itself need to be split in many other issues? Especially given the fact that me, webwarrior and Mershad have been trying this for several months and we're finding that it's not that easy to convert without finding regressions (so the smaller the conversion the better).
Yes, there is no bad intention, I agree that this is a complex issue that is not possible to be done by only one dev, what you guys propose? how we can make this process work better? I'm thinking on split this into several issues and @webwarrior-ws , @Mersho , @danfercf1 and you can start take issues and keep working on your own pace, but if you have any other proposal we of course can discuss it 😃
Yes, this kind of job needs to be splitted into more atomic tasks, but I think the must to have in any project is to have a really functional debugger configuration, I could start with that, and we can make a better planning in order to have a js to ts migration without regressions, I think we could have a time to talk in a meet about this in order to have all the stuff on mind
Hi @grunch, what do you think if I close this issue and I will create another one to configure the tsconfig.json and for the debugger, I think it could be added the folder for the build as well
Hi @danfercf1 let's discuss it with our other contributors @knocte, @webwarrior-ws @Mersho, what do you think about how we should continue ?
I realized that migration to TS has a good completed percentage and I think after it finishes, the main task to take in count is to define a build folder, it's because the ts to js compilation generates the compiled js files in many places and it creates a mess when you need to commit files. It could be part of the last task of the JS to TS migration. About the debugger it could be an isolated task or feature to add after the TS migration finishes it regards to define correctly the configuration just for a TS debugger
I realized that migration to TS has a good completed percentage and I think after it finishes, the main task to take in count is to define a build folder, it's because the ts to js compilation generates the compiled js files in many places and it creates a mess when you need to commit files. It could be part of the last task of the JS to TS migration. About the debugger it could be an isolated task or feature to add after the TS migration finishes it regards to define correctly the configuration just for a TS debugger
I agree @danfercf1 let's finish the JS to TS migration, then we work on the build folder
I think this issue can be closed I will create just another one to add the vscode debugger
I think this issue can be closed
Yes let's close this issue, and create smaller ones.
WRT JS->TS conversion, actually we have it basically finished on our end, but wouldn't it make more sense to tag a new release first? before we propose next PR. @grunch which version is LNp2pBot-Production running on?
I think this issue can be closed
Yes let's close this issue, and create smaller ones.
WRT JS->TS conversion, actually we have it basically finished on our end, but wouldn't it make more sense to tag a new release first? before we propose next PR. @grunch which version is LNp2pBot-Production running on?
makes sense, the bot is running version 0.11.0, let's release a new version
Summary
I would like to propose a feature that unifies all JavaScript (.js) files in the project into TypeScript (.ts). This proposal also includes updating the tsconfig.json configuration to output build files into a dedicated folder and adding support for the Visual Studio Code (VS Code) debugger. These changes will enhance code quality, project organization, and developer experience.
Motivation
Suggested changes
Implementation Details
Phased Migration: The conversion from JavaScript to TypeScript should be done incrementally to avoid disrupting the project. Each module can be converted individually and tested before moving on to the next.
Testing: Ensure that all tests pass after each conversion, and update or add tests as necessary for the TypeScript files.
Debugger Verification: After configuring the VS Code debugger, verify that breakpoints and step-through debugging work correctly with the compiled TypeScript code.
Potential Impact
Positive Impact:
Negative Impact:
Next Steps