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

Add a suite of IntelliJ run configurations #179

Open
wants to merge 1 commit into
base: scylla-3.x
Choose a base branch
from

Conversation

avelanarius
Copy link

@avelanarius avelanarius commented Nov 25, 2022

Add a suite of IntelliJ run configurations to make it easier for new developers to onboard the project and for better Maven discoverability. The run configurations should appear automatically after loading the project in IntelliJ, in the Run > Run... menu.

The configurations are organized to three groups:

  1. build: clean, format, build, full build
  2. test: unit tests, integration tests - including configurations to run them against Scylla, Cassandra, run only a single test
  3. install: package, install

Add a suite of IntelliJ run configurations to make it easier for new
developers to onboard the project and better Maven discoverability.
The run configurations should appear automatically after loading the
project in IntelliJ, in the Run > Run... menu.

The configurations are organized to three groups:
1. build: clean, format, build, full build
2. test: unit tests, integration tests - including configurations to run
   them against Scylla, Cassandra, run only a single test
3. install: package, install
@avelanarius
Copy link
Author

@Lorak-mmk thoughts?

@avelanarius
Copy link
Author

As @Gor027 mentioned, the tests targets are using Maven for running tests. This works correctly, but isn't super well integrated with IntelliJ. Moreover, it's hard to run such target in debug mode.

Maybe the targets should use the "native" JUnit target.

@Lorak-mmk
Copy link

As @Gor027 mentioned, the tests targets are using Maven for running tests. This works correctly, but isn't super well integrated with IntelliJ. Moreover, it's hard to run such target in debug mode.

Maybe the targets should use the "native" JUnit target.

I've checked out this PR and rebased it on scylla-3.x (no conflicts).
I agree that the integration is not perfect, but it's much much better than nothing which is afaik what we have now. Would it be difficult to switch to JUnit targets in the future, after merging this?
If not, then let's merge this and maybe switch in the future.

I've tried to run the tests using those targets.
single variants work, but all variants fail with: Cannot instantiate class com.datastax.driver.core.HostTargetingTest. I'm not sure if it's a problem with those configurations or something else as I haven't touched Java Driver for quite some time.

One thing I'd change before merging (apart from fixing all failures) is to explain the difference between single and all variants, because those names are non-descriptive and even after reading trough this PR diff I still don't get the difference, so please put the explanation in CONTRIBUTING.md

@Bouncheck Bouncheck self-assigned this Jul 26, 2024
@dkropachev
Copy link
Collaborator

tbh, I don't think it is good idea:

  1. We will need to keep it updated
  2. What about vim, atom, vscode users ? are we going to create same thing for them ?

I think it would be better to have a Makefile or anything like that, that could be used by everyone and in cicd as well.

@Lorak-mmk
Copy link

tbh, I don't think it is good idea:

1. We will need to keep it updated

2. What about vim, atom, vscode users ? are we going to create same thing for them ?

If there is a need for that the I don't see why not. I know that @avelanarius used Intelij to develop Java Driver, and I did too - because Java support is much worse in VsCode (I suspect its true for other text editors too) than in Intelij.
Imo Java is one of very few languages where using fully fledged IDE makes a lot of sense.

I think it would be better to have a Makefile or anything like that, that could be used by everyone and in cicd as well.

The problem is that Makefile won't be well integrated with IDE. It's nice to have buttons for run / test / debug working, being able to easily run a single test by clicking on it etc.

@dkropachev
Copy link
Collaborator

tbh, I don't think it is good idea:

1. We will need to keep it updated

2. What about vim, atom, vscode users ? are we going to create same thing for them ?

If there is a need for that the I don't see why not. I know that @avelanarius used Intelij to develop Java Driver, and I did too - because Java support is much worse in VsCode (I suspect its true for other text editors too) than in Intelij. Imo Java is one of very few languages where using fully fledged IDE makes a lot of sense.

I think it would be better to have a Makefile or anything like that, that could be used by everyone and in cicd as well.

The problem is that Makefile won't be well integrated with IDE. It's nice to have buttons for run / test / debug working, being able to easily run a single test by clicking on it etc.

True, but it is going to be a truth source, where you can find and see how exactly it is done.
For IDEs we can just document this part.
And, tbh, I did not have any problem running test and debug this, even though I am not a prolific java developer.

@Lorak-mmk
Copy link

Lorak-mmk commented Oct 1, 2024

tbh, I don't think it is good idea:

1. We will need to keep it updated

2. What about vim, atom, vscode users ? are we going to create same thing for them ?

If there is a need for that the I don't see why not. I know that @avelanarius used Intelij to develop Java Driver, and I did too - because Java support is much worse in VsCode (I suspect its true for other text editors too) than in Intelij. Imo Java is one of very few languages where using fully fledged IDE makes a lot of sense.

I think it would be better to have a Makefile or anything like that, that could be used by everyone and in cicd as well.

The problem is that Makefile won't be well integrated with IDE. It's nice to have buttons for run / test / debug working, being able to easily run a single test by clicking on it etc.

True, but it is going to be a truth source, where you can find and see how exactly it is done. For IDEs we can just document this part.

I don't see a problem with adding both a Makefile and IDE integration.
If by documentation you mean documenting the Makefile as the source of truth, then it doesn't help with IDE integration at all.
If you mean specific instructions to add IDE integration yourself then I think maintaining the integration is much easier than maintaining such instructions. It will also automatically work for all devs using given IDE, including updates.

And, tbh, I did not have any problem running test and debug this, even though I am not a prolific java developer.

Something being "possible" is different that it being "comfortable". Were you able to just click a button in IDE to run all the tests?

@wprzytula wprzytula removed their request for review December 19, 2024 14:25
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

Successfully merging this pull request may close these issues.

4 participants