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

Add more documentation to exceptions #14211

Closed
bennydreamtech23 opened this issue Jan 22, 2025 · 19 comments
Closed

Add more documentation to exceptions #14211

bennydreamtech23 opened this issue Jan 22, 2025 · 19 comments

Comments

@bennydreamtech23
Copy link
Contributor

bennydreamtech23 commented Jan 22, 2025

  • In the exception, examples and advisable steps that can be taken should be suggested
  • The BadFunctionError have no documentation to it
  • Would like to contribute to this issues
@josevalim josevalim changed the title Add more documentation on BadFunctionError Add more documentation to exceptions Jan 22, 2025
@josevalim
Copy link
Member

I believe this is generally a good suggestion. Our exceptions generally mean "bad input", so there isn't much we can do on advisable steps rather than "make sure you give the correct input", but I am certain adding examples of when they are raised will enrich the documentation.

@bennydreamtech23
Copy link
Contributor Author

But the exceptions are caused by various issues and someone new to elixir, might not understand how to debug and understand the exceptions, so suggestion such as understand the error message base on the type of error message, inspect the problem using IO.inspect, convert or validate the input, this one is a suggestion for an error on BadBooleanError that is one of the exceptions and I did all this jotting down by understanding the errors and the steps that can guild me and I think it would help someone else and will also enrich the documentation
Thank you

@bennydreamtech23
Copy link
Contributor Author

Please need help, having issue running the make or to format my code that i am trying to contribute @josevalim,
getting this error:
Runtime terminating during boot ({undef,[{'Elixir.Kernel.CLI',main,[["+elixirc","--ignore-module-conflict","lib/elixir/unicode/unicode.ex","-o","lib/elixir/ebin"]],[]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done
make[1]: *** [Makefile:108: lib/elixir/ebin/Elixir.String.Unicode.beam] Error 1
make[1]: Leaving directory '/root/elixir'
make: *** [Makefile:94: lib/elixir/ebin/Elixir.Kernel.beam] Error 2

@josevalim
Copy link
Member

Can you please let us know which steps you ran in order to compile it? Also please let us know your Erlang version. Thank you!

@bennydreamtech23
Copy link
Contributor Author

bennydreamtech23 commented Jan 23, 2025

@josevalim

  • git clone https://github.com/elixir-lang/elixir.git

  • then i did git checkout -b (new branch) from main

  • then did make clean

  • then try to run make, that when i got that error

  • i am using Erlang/OTP 27 [erts-15.1.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]
    Eshell V15.1.3 (press Ctrl+G to abort, type help(). for help)

  • Elixir version: Erlang/OTP 27 [erts-15.1.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

Elixir 1.18.1 (compiled with Erlang/OTP 26)

Thank you

@josevalim
Copy link
Member

Hrm, you should not see an "Elixir version". I wonder if the Elixir version you have on your system is impacting the one you are compiling? Can you do this:

PATH="/root/elixir/ebin:$PATH" make clean compile

@bennydreamtech23
Copy link
Contributor Author

Okay, i will this now Thank you

@bennydreamtech23
Copy link
Contributor Author

Okay, i will this now Thank you, still having the same issue: make[1]: Entering directory '/root/elixir'
==> unicode (compile)
Runtime terminating during boot ({undef,[{'Elixir.Kernel.CLI',main,[["+elixirc","--ignore-module-conflict","lib/elixir/unicode/unicode.ex","-o","lib/elixir/ebin"]],[]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done
make[1]: *** [Makefile:108: lib/elixir/ebin/Elixir.String.Unicode.beam] Error 1
make[1]: Leaving directory '/root/elixir'
make: *** [Makefile:94: lib/elixir/ebin/Elixir.Kernel.beam] Error 2

@josevalim
Copy link
Member

Sorry, I can't explain it. The above is supposed to work. The only other reason I can think is that there is a bug in the most recent Erlang (you are using one patch version after mine) but I find that to be unlikely.

@bennydreamtech23
Copy link
Contributor Author

I am trying to install a lower version

@bennydreamtech23
Copy link
Contributor Author

should i also reduce the elixir -v, because now i am getting this error: Runtime terminating during boot ({undef,[{Elixir.Kernel.CLI,main,+elixirc--ignore-module-conflictlib/elixir/unicode/unicode.ex-olib/elixir/ebin,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done
make[1]: *** [Makefile:108: lib/elixir/ebin/Elixir.String.Unicode.beam] Error 1
make[1]: Leaving directory '/root/elixir'
make: *** [Makefile:94: lib/elixir/ebin/Elixir.Kernel.beam] Error 2 @josevalim

@josevalim
Copy link
Member

If you can't compile Elixir, elixir -vwon't work either.

@bennydreamtech23
Copy link
Contributor Author

Thank you, it finally generated

@bennydreamtech23
Copy link
Contributor Author

@josevalim
Thank you
everything works well
I tried to push to a new branch and make a pull request but i don't have permission
git push origin ELIXIR_#14211
remote: Permission to elixir-lang/elixir.git denied to bennydreamtech23.
fatal: unable to access 'https://github.com/elixir-lang/elixir.git/': The requested URL returned error: 403

@SteffenDE
Copy link
Contributor

@bennydreamtech23 you'll need to fork the repository and then push to your fork:

Use the fork button on this page: https://github.com/elixir-lang/elixir

Then, assuming your repository is called "bennydreamtech23/elixir" use

$ git remote set-url origin [email protected]:bennydreamtech23/elixir.git
$ git push

@bennydreamtech23
Copy link
Contributor Author

Thank you

@bennydreamtech23
Copy link
Contributor Author

Have succesfully created the pull request

@josevalim
Copy link
Member

Closing in favor of the PR, thank you!

@bennydreamtech23
Copy link
Contributor Author

wow Thank you so muh, I am very thrilled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants