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

Using AlpineJS #44

Closed
ghost opened this issue Jul 20, 2021 · 5 comments · Fixed by #59
Closed

Using AlpineJS #44

ghost opened this issue Jul 20, 2021 · 5 comments · Fixed by #59
Labels
feature New feature request UI Invole user interface

Comments

@ghost
Copy link

ghost commented Jul 20, 2021

Add AlpineJS for the web view, to simplify UI avoiding backend interaction (for LiveView) for just UI rendering.

@ghost ghost added feature New feature request UI Invole user interface labels Jul 20, 2021
@ambareesha7
Copy link
Contributor

I have integrated Alpinejs into project but I couldn't push the changes to GitHub repository it throwing credo errors

here is the errors:

ambi@av archethic-node % git push -u origin add-alpinejs                    ↗ Running hooks for :pre_push
✔ `mix clean` was successful
✔ `mix format --check-formatted` was successful
mkdir -p priv/c_dist
/usr/bin/gcc src/c/crypto/stdio_helpers.c src/c/crypto/ed25519.c -o priv/c_dist/libsodium_port -I src/c/crypto/stdio_helpers.h -lsodium
/usr/bin/gcc src/c/hypergeometric_distribution.c -o priv/c_dist/hypergeometric_distribution -lgmp
Compiling 6 files (.erl)
Compiling 268 files (.ex)
Generated archethic app
✔ `mix compile --warnings-as-errors` was successful
Checking 385 source files (this might take a while) ...
warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:

    def text do
      """
    contents
      """
    end

Instead make sure the contents are indented as much as the heredoc closing:

    def text do
      """
      contents
      """
    end

The current heredoc line is indented too little
  lib/archethic/governance/code/CICD.ex:3

warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:

    def text do
      """
    contents
      """
    end

Instead make sure the contents are indented as much as the heredoc closing:

    def text do
      """
      contents
      """
    end

The current heredoc line is indented too little
  lib/archethic/contracts.ex:26

warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:

    def text do
      """
    contents
      """
    end

Instead make sure the contents are indented as much as the heredoc closing:

    def text do
      """
      contents
      """
    end

The current heredoc line is indented too little
  lib/archethic/oracle_chain/summary.ex:20

warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:

    def text do
      """
    contents
      """
    end

Instead make sure the contents are indented as much as the heredoc closing:

    def text do
      """
      contents
      """
    end

The current heredoc line is indented too little
  lib/archethic/governance/code/proposal/parser.ex:5

warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:

    def text do
      """
    contents
      """
    end

Instead make sure the contents are indented as much as the heredoc closing:

    def text do
      """
      contents
      """
    end

The current heredoc line is indented too little
  lib/archethic/contracts/interpreter/library.ex:54

warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:

    def text do
      """
    contents
      """
    end

Instead make sure the contents are indented as much as the heredoc closing:

    def text do
      """
      contents
      """
    end

The current heredoc line is indented too little
  lib/archethic/utils/job_cache.ex:78

warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:

    def text do
      """
    contents
      """
    end

Instead make sure the contents are indented as much as the heredoc closing:

    def text do
      """
      contents
      """
    end

The current heredoc line is indented too little
  lib/archethic/contracts/interpreter.ex:50


  Warnings - please take a look                                                 
┃ 
┃ [W] ↗ There should be no unused return values for Enum functions.
┃       lib/archethic/p2p/mem_table_loader.ex:52:5 #(ArchEthic.P2P.MemTableLoader.init)

Please report incorrect results: https://github.com/rrrene/credo/issues

Analysis took 8.9 seconds (0.3s to load, 8.5s running 56 checks on 385 files)
2610 mods/funs, found 1 warning.

Use `mix credo explain` to explain issues, `mix credo --help` for options.
× pre_push failed on `mix credo --strict`
** (exit) 1
    lib/mix/tasks/git_hooks/run.ex:185: Mix.Tasks.GitHooks.Run.error_exit/1
    lib/mix/tasks/git_hooks/run.ex:138: Mix.Tasks.GitHooks.Run.run_task/3
    (elixir 1.12.1) lib/enum.ex:930: Enum."-each/2-lists^foreach/1-0-"/2
    lib/mix/tasks/git_hooks/run.ex:63: Mix.Tasks.GitHooks.Run.run/1
    (mix 1.12.1) lib/mix/task.ex:394: anonymous fn/3 in Mix.Task.run_task/3
    (mix 1.12.1) lib/mix/cli.ex:84: Mix.CLI.run_task/2
error: failed to push some refs to 'https://github.com/ambareesha7/archethic-node.git'

I googled but I can't find any solution
please suggest me how to fix it

@ghost
Copy link
Author

ghost commented Aug 30, 2021

Hello @ambareesha7.
Thanks for the integration.
I will look to find the issue.

@ambareesha7
Copy link
Contributor

one more thing, the new versions of Phoenix 1.6, LiveView 0.16 with lot of new features has been released how this new update would be handled? maybe there are some breaking changes made in new release
New LiveView HEEx engine,
New authentication and mailer generators,
New LiveView server lifecycle hooks,
New LiveView live_session for optimized navigation,
Node and webpack free asset building with esbuild

Phoenix 1.6.0-rc.0 released!

@ambareesha7
Copy link
Contributor

Hey @samuel-uniris now the credo --strict errors are gone but the very last error still popping up and preventing me to push the code into GitHub repo
below is the error:

 Warnings - please take a look                                                 
┃ 
┃ [W] ↗ There should be no unused return values for Enum functions.
┃       lib/archethic/p2p/mem_table_loader.ex:52:5 #(ArchEthic.P2P.MemTableLoader.init)

@ghost
Copy link
Author

ghost commented Sep 4, 2021

Can you check with the last version of the master .

As you see here:

Enum.each(DB.get_last_p2p_summaries(), &load_p2p_summary/1)

It's using a Enum.each instead Enum.map now.

@ghost ghost linked a pull request Sep 6, 2021 that will close this issue
@ghost ghost closed this as completed in #59 Sep 6, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request UI Invole user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant