Skip to content

Feature/general improvements #2

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

Merged
merged 13 commits into from
Oct 3, 2020

Conversation

lrascao
Copy link
Contributor

@lrascao lrascao commented Aug 14, 2020

This set of commits are general quality of life minor improvements, tests were failing on MacOS and should be passing now.
This is a WIP as it's waiting on rusterlium/erlang-cargo#6, a second PR after that one and a Hex version cut.

rebar.config Outdated
{deps, [
{cargo, ".*",
{git, "https://github.com/lrascao/erlang-cargo.git",
{branch, "feature/target_dir"}}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this branch is perched on top of rusterlium/erlang-cargo#6 and will be PR'd after it

@lrascao lrascao force-pushed the feature/general_improvements branch 3 times, most recently from 7c31cfb to e170fa3 Compare August 23, 2020 22:34
Through a `rebar.config` cargo opt, ie.
``
{cargo_opts, [
   {src_dir, "rs_src"}
]}.
``
@lrascao lrascao force-pushed the feature/general_improvements branch from e170fa3 to 090a867 Compare August 23, 2020 22:40
@lrascao lrascao force-pushed the feature/general_improvements branch from 090a867 to 51a3b07 Compare August 31, 2020 15:27
@filmor
Copy link
Member

filmor commented Sep 7, 2020

Ah, sorry, I didn't see the part about you waiting for a Hex release, will do that tomorrow.

@lrascao
Copy link
Contributor Author

lrascao commented Sep 7, 2020

I guess we can wait until this one passes review

@lrascao
Copy link
Contributor Author

lrascao commented Sep 8, 2020

i'll try and squeeze in some time this week so it can promoted out of WIP and start the review

@lrascao lrascao force-pushed the feature/general_improvements branch from 51a3b07 to a9ba1d0 Compare September 9, 2020 08:05
@lrascao lrascao changed the title WIP Feature/general improvements Feature/general improvements Sep 9, 2020
@lrascao
Copy link
Contributor Author

lrascao commented Sep 9, 2020

@filmor this is now ready for review, if approved, before merging we can cut a new hex version of erlang-cargo and fixup 95aadb3

IncludeDir = filename:join(OutDir0, "include"),
SrcDir = filename:join(OutDir0, "src"),
% prefer the include dir to generate crates.hrl to (if it exists)
OutDir = case filelib:is_dir(IncludeDir) of
Copy link
Member

Choose a reason for hiding this comment

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

No, the crates.hrl is not a "public" header file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree, and it should be git ignored by any project using it. But if it's getting generated somewhere might as well be include (if possible), tipically only .erl files live in src

Copy link
Member

Choose a reason for hiding this comment

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

The convention seems to be to have internal headers in src.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, i can move this commit out of this PR context, another way would be to introduce an option for the target dir of crates.hrl that defaults to src, thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

I still stand by this, please move this change out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

7dad8595 has been removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1e489afe that contained this change has been dropped

@lrascao lrascao force-pushed the feature/general_improvements branch from 7deafce to 4288306 Compare September 9, 2020 14:57
@lrascao
Copy link
Contributor Author

lrascao commented Sep 22, 2020

@filmor just checking, is something blocking this or just not enough bandwidth atm?

@lrascao lrascao force-pushed the feature/general_improvements branch from 4288306 to fe7f835 Compare October 1, 2020 13:05
lrascao added 11 commits October 1, 2020 14:13
Only have it return the `priv` and callers can add
whatever.
The VM only cares about .dll or .so NIF's.
cargo is already generating a lot of distracting output, humans
only usually care about output when something goes wrong.
On MacOS debug symbol symlink to dirs are also part of the
generated artifacts, we're not interested in copying those.
We can't have a test for both (at least on MacOS), when they are both
in a single Cargo workspace they will share the same dependencies. This
means that when linking the .dylib it will also pick up the other binary
as a dependency and now it's no longer a dynamic library.
Such as the executable permissions of the port binaries.
@lrascao lrascao force-pushed the feature/general_improvements branch from fe7f835 to 959bd6b Compare October 1, 2020 13:14
@filmor
Copy link
Member

filmor commented Oct 1, 2020

Sorry for the lag, looks good, I'll go over it once more on the weekend and merge.

@filmor filmor merged commit a970cdc into rusterlium:master Oct 3, 2020
@lrascao lrascao deleted the feature/general_improvements branch October 4, 2020 22:36
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.

2 participants