-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Native Elixir Fixes #1021
base: native-elixir
Are you sure you want to change the base?
Native Elixir Fixes #1021
Conversation
5ad06c7
to
f93789f
Compare
f93789f
to
9919545
Compare
core/erlc.mk
Outdated
# Older git versions do not have the --first-parent flag. Do without in that case. | ||
$(eval GITDESCRIBE := $(shell git describe --dirty --abbrev=7 --tags --always --first-parent 2>/dev/null \ | ||
|| git describe --dirty --abbrev=7 --tags --always 2>/dev/null || true)) | ||
$(eval MODULES := $(MODULES) $(patsubst %,'%',$(sort $(notdir $(basename \ | ||
$(eval MODULES := $(MODULES) $(notdir $(basename $(wildcard ebin/Elixir.*))) $(patsubst %,'%',$(sort $(notdir $(basename \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't do that, the wildcard function operates on cache that is updated at the start of executing the target, so it won't know about the new Elixir beam files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, leave it with me and I'll double check against what I have locally - could be the case that I need to rollback that change
I need more info about the two most recent commits because I don't know what they do. |
@essen tried a different way of getting the elixir beams, let me know what you think I'll add an explanation under the commits in the PR description to say why it's needed 👍 |
I don't think you need to go that far. It is much better to get the modules list from the compilation, we only need a way to signal success or failure. That could be signaled as a word in the output, which we would then check, before making See word related functions in https://www.gnu.org/software/make/manual/html_node/Text-Functions.html especially firstword, wordlist. |
I feel dumb - I forgot entirely about I'll revert that and get a change pushed up now 👍
Ignore the previous question - had a brain fart |
.ex
compilation from continuing to create a$(PROJECT).app
file, I've moved the elixir generation code to be ran by the actual shell. Doing this though meant the Module names of the compiled.ex
files needed to be found separately. To solve this, I've tried to use a shell command to manually build the Module name based on the__aliases__
attribute in the elixir ast of the codemint
that it referenced theMix.Project.config()
at compile time, hence the need to load themix.exs
project during.ex
compilationcompile_ex.erl
to return the compiled modules for easier var binding. The erl code will now redirect the errors printed by'Elixir.Kernel.ParallelCompiler':compile_to_path/2
tostderr
& print tostdout
only for the module names or the word_ERROR_
on a failed compilation