Merged
Conversation
Contributor
Author
matklad
reviewed
Mar 10, 2020
|
|
||
| // Note: Some env variables (e.g. OUT_DIR) are located outside of the | ||
| // crate. We store a map to allow remap it to ExternSourceId | ||
| extern_paths: FxHashMap<String, ExternSourceId>, |
Contributor
There was a problem hiding this comment.
Hm, it's ... less then ideal that we need to single out OUT_DIR this way, but I guess that's the only way given current VFS API...
Contributor
Author
There was a problem hiding this comment.
Yes, it is the only solution I came up without altering too much code. But after some thoughts, I think I should separate this part to a new struct ExternPathsExternSource and put it in CrateGraph instead.
[Edit] change to ExternSource
Contributor
|
I could look into hooking up the check code to send events for the OUT_DIR
info and add a way to trigger a single check sometime this week. Shouldn't
be too hard given that all the infrastructure for event passing is already
in place 👍
…On Wed, 11 Mar 2020, 04.07 Edwin Cheng, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In crates/ra_db/src/input.rs
<#3549 (comment)>
:
> #[derive(Default, Debug, Clone, PartialEq, Eq)]
pub struct Env {
entries: FxHashMap<String, String>,
+
+ // Note: Some env variables (e.g. OUT_DIR) are located outside of the
+ // crate. We store a map to allow remap it to ExternSourceId
+ extern_paths: FxHashMap<String, ExternSourceId>,
Done!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3549>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABTDKNNGM2EIKW7LC5KDWDRG357FANCNFSM4LFBOCEA>
.
|
Contributor
|
bors r+ |
Contributor
Build succeeded |
This was referenced Mar 12, 2020
Closed
sdbondi
added a commit
to sdbondi/tari
that referenced
this pull request
Jan 29, 2021
Cleans up the code a bit in tari_core::proto by removing the `generated` module. Instead of including the generated files directly, protos are generated to the OUT_DIR and included using the `include!` macro. This is the intended way that generated files are included, however this would break intellisense in IDEs. IDE and rust analyser support for OUT_DIR has greatly improved. see: https://blog.jetbrains.com/clion/2019/12/recent-updates-in-rust/ rust-lang/rust-analyzer#3549
sdbondi
added a commit
to sdbondi/tari
that referenced
this pull request
Jan 29, 2021
Cleans up the code a bit in tari_core::proto by removing the `generated` module. Instead of including the generated files directly, protos are generated to the OUT_DIR and included using the `include!` macro. This is the intended way that generated files are included, however this would break intellisense in IDEs. IDE and rust analyser support for OUT_DIR has greatly improved. see: https://blog.jetbrains.com/clion/2019/12/recent-updates-in-rust/ rust-lang/rust-analyzer#3549
sdbondi
added a commit
to sdbondi/tari
that referenced
this pull request
Jan 29, 2021
Cleans up the code a bit in tari_core::proto by removing the `generated` module. Instead of including the generated files directly, protos are generated to the OUT_DIR and included using the `include!` macro. This is the intended way that generated files are included, however this would break intellisense in IDEs. IDE and rust analyser support for OUT_DIR has greatly improved. see: https://blog.jetbrains.com/clion/2019/12/recent-updates-in-rust/ rust-lang/rust-analyzer#3549
13 tasks
sdbondi
added a commit
to sdbondi/tari
that referenced
this pull request
Jan 29, 2021
Cleans up the code a bit in tari_core::proto by removing the `generated` module. Instead of including the generated files directly, protos are generated to the OUT_DIR and included using the `include!` macro. This is the intended way that generated files are included, however this would break intellisense in IDEs. IDE and rust analyser support for OUT_DIR has greatly improved. see: https://blog.jetbrains.com/clion/2019/12/recent-updates-in-rust/ rust-lang/rust-analyzer#3549
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR implements
env!macro by adding following things:additional_outdirssettings in vscode. (naming to be bikeshed)ExternSourceIdwhich is a wrapping for SourceRootId but only used in extern sources. It is becauseOUT_DIRis not belonged to any crate and we have to access it behind anAstDatabase.OUT_DIRparsing fromcargo check. I don't have general design about this, @kiljacken could we reuse some cargo watch code for that ?Block on [#3536]PS: After this PR , we (kind of) completed the
include!(concat!(env!('OUT_DIR'), "foo.rs")macro call combo. Exodia Obliterate!