-
Notifications
You must be signed in to change notification settings - Fork 11
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
marker_rustc_driver
as a library?
#257
Comments
When we discussed this topic previously, I didn't think about the fact that
I want to explain where I got these questions from. Since Dylint has a larger ordinance right now, it would be cool to get some more exposure this way. However, if the provided Marker version in Dylint causes compilation errors due to wrong nightly versions or is very outdated, I fear that it might give a negative first impression. I fully believe in your good intentions, which is why I state this concern so openly. I hope you understand why I'm asking these questions. :) |
Cool. I'd be happy to submit a PR. Is it okay to add a lib target to
The PoC is currently pinned to the toolchain Marker 0.2.1 uses (nightly-2023-07-13). I expect it would not be hard to write a GitHub workflow to open a PR whenever there is a new Marker release. That PR could include an update to the Dylint library's rust-toolchain file, i.e., to version the new Marker release uses. So, in other words, these two things should stay in sync:
|
Hmm, I'd prefer it being a conditional target if that's easily possible. An advantage of this change is that @Veetaha Do you think, such a change would conflict with the release infrastructure you build for Marker?
Exactly, the question is basically if you're okay with taking up the responsibility of keeping them in sync. Small side note: My RL is currently taking up a good amount of my time, and I'm focussing the next release. It might take a bit more time until I respond to the Dylint discussion, but that's due to external factors :) |
It don't, |
The simplest solution would be to use an unconditional library target. I will submit a PR using that approach. If it's deemed undesirable, I will investigate the conditional compilation idea.
I am okay with it. (I expect that part to be easy.)
No problem at all. |
How would you feel about exposing
marker_rustc_driver
internals as a library?Context: I have been experimenting with idea of running Marker lints under a Dylint driver, and I have a PoC. The PoC is essentially a single configurable Dylint library. The configuration (i.e.,
dylint.toml
file) tells the Dylint library where to find the Marker libraries. For example, in my tests, the file looks as follows:So, essentially, the PoC is a shared library that loads other shared libraries. For anyone interested in trying it out, the following should work:
This will run a slightly modified version of the
diag_msg_uppercase_start
tests using the setup described above.To make the above work, I had to copy a bunch of
marker_rustc_driver
's code. I would like to include this PoC as a test in the Dylint repository, but I would prefer to not copy that code (hence, this question).Note that GitHub access to the library would suffice. So if you do not want to publish
marker_rustc_driver
internals as a library on crates.io (which would be perfectly reasonable), there may be a way to expose the internals as a library through conditional compilation.The text was updated successfully, but these errors were encountered: