Skip to content
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

Changes on codes in project are not applied to notebooks #455

Open
sgc109 opened this issue Mar 31, 2024 · 5 comments
Open

Changes on codes in project are not applied to notebooks #455

sgc109 opened this issue Mar 31, 2024 · 5 comments

Comments

@sgc109
Copy link

sgc109 commented Mar 31, 2024

Even though I added new constructor parameter on a class in my project, compile error occurs when I run notebook saying 'Too many arguments ...'.

It usually takes so much time for changes in the project to be reflected. It also doesn't work even if I delete build directory and rebuild the project.

Is it possible to sync changes manually if there is no way to apply changes automatically?

Notebook plugin version: 233.14475.9
Kotlin compiler version: 1.9.0

@ileasile
Copy link
Member

Hi! Have you tried %useLatestDescriptors?

@ileasile
Copy link
Member

And what exact changes do you wish to reflect?

@sgc109
Copy link
Author

sgc109 commented Mar 31, 2024

@ileasile Hi, I've just tried %useLatestDescriptors on for the first time at the moment, but it still doesn't work.
As I mentioned, I just added a constructor parameter on a class in src/main/kotlin in the same project where the notebook exists. But, there is still a compile error Line_46.jupyter.kts (5:43 - 63) Too many arguments for public constructor StrategySimulator() defined in portfolio.rebalancer.StrategySimulator.

@sgc109
Copy link
Author

sgc109 commented Mar 31, 2024

But, isn't %useLatestDescriptors related to the library getting with %use?
My issue is about the compiler can't recognize the code update in the same project.

@ileasile
Copy link
Member

I see, it's actually not a kernel problem, it should be filed in https://youtrack.jetbrains.com/issues/KTNB. Please check following things:

  1. In notebook settings the module you depend on is enabled
  2. Restart notebook session after changes are made to make sure classes are rebuilt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants