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

Generate boilerplate in shared sources #4302

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joroKr21
Copy link
Member

to a place that works for Intellij

satorg
satorg previously approved these changes Sep 18, 2022
Copy link
Contributor

@satorg satorg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change – seems more convenient to work with.

@satorg
Copy link
Contributor

satorg commented Sep 18, 2022

I wonder if it is possible to change a location of boilerplate source files too.
Because currently it is just <root>/project/ which does not seem to be obvious and easy to discover.

@armanbilge
Copy link
Member

I wonder if it is possible to change a location of boilerplate source files too.
Because currently it is just /project/ which does not seem to be obvious and easy to discover.

Yes, this is possible. Here's how sbt-tl uses its own sources in its build.
https://github.com/typelevel/sbt-typelevel/blob/2d044e40474cb1ac94d5c446577e541c59ff743a/project/build.sbt#L20-L26

Copy link
Member

@armanbilge armanbilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I took another look at this, and I'm not that crazy about it. I don't like changing default settings for a particular build. IMO either

  1. this seems like an IntelliJ issue that should be fixed instead of worked-around.
  2. it's an sbt issue and it should be changed at a higher-level (e.g. sbt-typelevel or sbt itself ideally)

I suspect it's more of a (1) :)

@joroKr21
Copy link
Member Author

this seems like an IntelliJ issue that should be fixed instead of worked-around.

I agree it should be fixed in Intellij but I don't see why it means that it shouldn't be worked around.

it's an sbt issue and it should be changed at a higher-level (e.g. sbt-typelevel or sbt itself ideally)

Dunno, I think most projects don't generate boilerplate. This change only makes sense when the generated boilerplate is shared sources in a cross-compiled module. And needs a .gitignore addition as well. So it doesn't seem possible to fix that in sbt.

to a place that works for Intellij
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.

None yet

3 participants