Skip to content

Conversation

dcdourado
Copy link
Collaborator

@dcdourado dcdourado commented May 21, 2021

After checking an error of CI pipeline on #50, I'm removing halt-exit-status arg since its not valid.

Run mix dialyzer --no-check --halt-exit-status
:ignore_warnings opt specified in mix.exs: dialyzer.ignore-warnings, but file does not exist.

halt_exit_status is no longer a valid CLI argument.
...

@dcdourado dcdourado self-assigned this May 21, 2021
@dcdourado dcdourado changed the title fix: remove halt-exit-status arg from main.yml fix(workflows): remove halt-exit-status arg from main.yml May 21, 2021
@dcdourado
Copy link
Collaborator Author

dcdourado commented May 21, 2021

After changes, we still have these errors on dialyzer:

lib/credentials/passwords.ex:9:no_return
Function create/1 has no local return.
________________________________________________________________________________
lib/credentials/public_keys.ex:13:no_return
Function create/1 has no local return.
________________________________________________________________________________
lib/credentials/schemas/password.ex:51:no_return
Function changeset/1 has no local return.
________________________________________________________________________________
lib/credentials/schemas/password.ex:51:call
The function call will not succeed.

ResourceManager.Credentials.Schemas.Password.changeset(
  %ResourceManager.Credentials.Schemas.Password{
    :__meta__ => %Ecto.Schema.Metadata{
      :context => nil,
      :prefix => nil,
      :schema => ResourceManager.Credentials.Schemas.Password,
      :source => <<112, 97, 115, 115, 119, 111, 114, 100, 115>>,
      :state => :built
    },
    :algorithm => <<97, 114, 103, 111, 110, 50>>,
    :id => nil,
    :inserted_at => nil,
    :password_hash => nil,
    :salt => 16,
    :updated_at => nil,
    :user => %Ecto.Association.NotLoaded{
      :__cardinality__ => :one,
      :__field__ => :user,
      :__owner__ => ResourceManager.Credentials.Schemas.Password
    },
    :user_id => nil,
    :value => nil
  },
  _params :: map()
)

breaks the contract
(model :: t(), params :: map()) :: Ecto.Changeset.t()

________________________________________________________________________________
lib/credentials/schemas/public_key.ex:44:no_return
Function changeset/1 has no local return.
________________________________________________________________________________
lib/credentials/schemas/public_key.ex:44:call
The function call will not succeed.

ResourceManager.Credentials.Schemas.PublicKey.changeset(
  %ResourceManager.Credentials.Schemas.PublicKey{
    :__meta__ => %Ecto.Schema.Metadata{
      :context => nil,
      :prefix => nil,
      :schema => ResourceManager.Credentials.Schemas.PublicKey,
      :source => <<112, 117, 98, 108, 105, 99, 95, 107, 101, 121, 115>>,
      :state => :built
    },
    :client_application => %Ecto.Association.NotLoaded{
      :__cardinality__ => :one,
      :__field__ => :client_application,
      :__owner__ => ResourceManager.Credentials.Schemas.PublicKey
    },
    :client_application_id => nil,
    :format => <<112, 101, 109>>,
    :id => nil,
    :inserted_at => nil,
    :type => <<114, 115, 97>>,
    :updated_at => nil,
    :value => nil
  },
  _params :: map()
)

breaks the contract
(model :: t(), params :: map()) :: Ecto.Changeset.t()

________________________________________________________________________________
lib/identities/client_applications.ex:11:no_return
Function create/1 has no local return.
________________________________________________________________________________
lib/identities/commands/create_client_application.ex:22:no_return
The created anonymous function has no local return.
________________________________________________________________________________
lib/identities/commands/create_client_application.ex:44:no_return
Function create_application/1 has no local return.
________________________________________________________________________________
lib/identities/commands/create_client_application.ex:50:unused_fun
Function create_permission/2 will never be called.
________________________________________________________________________________
lib/identities/commands/create_user.ex:22:no_return
The created anonymous function has no local return.
________________________________________________________________________________
lib/identities/commands/create_user.ex:44:no_return
Function create_user/1 has no local return.
________________________________________________________________________________
lib/identities/commands/create_user.ex:50:unused_fun
Function create_permission/2 will never be called.
________________________________________________________________________________
lib/identities/schemas/client_application.ex:61:no_return
Function changeset/1 has no local return.
________________________________________________________________________________
lib/identities/schemas/client_application.ex:61:call
The function call will not succeed.

ResourceManager.Identities.Schemas.ClientApplication.changeset(
  %ResourceManager.Identities.Schemas.ClientApplication{
    :__meta__ => %Ecto.Schema.Metadata{
      :context => nil,
      :prefix => nil,
      :schema => ResourceManager.Identities.Schemas.ClientApplication,
      :source =>
        <<99, 108, 105, 101, 110, 116, 95, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111,
          110, 115>>,
      :state => :built
    },
    :access_type => <<99, 111, 110, 102, 105, 100, 101, 110, 116, 105, 97, 108>>,
    :blocked_until => nil,
    :client_id => nil,
    :description => nil,
    :grant_flows => nil,
    :id => nil,
    :inserted_at => nil,
    :is_admin => false,
    :name => nil,
    :protocol => <<111, 112, 101, 110, 105, 100, 45, 99, 111, 110, 110, 101, 99, 116>>,
    :public_key => %Ecto.Association.NotLoaded{
      :__cardinality__ => :one,
      :__field__ => :public_key,
      :__owner__ => ResourceManager.Identities.Schemas.ClientApplication
    },
    :redirect_uri => nil,
    :scopes => %Ecto.Association.NotLoaded{
      :__cardinality__ => :many,
      :__field__ => :scopes,
      :__owner__ => ResourceManager.Identities.Schemas.ClientApplication
    },
    :secret => nil,
    :status => <<97, 99, 116, 105, 118, 101>>,
    :updated_at => nil
  },
  _params :: map()
)

breaks the contract
(model :: t(), params :: map()) :: Ecto.Changeset.t()

________________________________________________________________________________
lib/identities/schemas/user.ex:47:no_return
Function changeset/1 has no local return.
________________________________________________________________________________
lib/identities/schemas/user.ex:47:call
The function call will not succeed.

ResourceManager.Identities.Schemas.User.changeset(
  %ResourceManager.Identities.Schemas.User{
    :__meta__ => %Ecto.Schema.Metadata{
      :context => nil,
      :prefix => nil,
      :schema => ResourceManager.Identities.Schemas.User,
      :source => <<117, 115, 101, 114, 115>>,
      :state => :built
    },
    :blocked_until => nil,
    :id => nil,
    :inserted_at => nil,
    :is_admin => false,
    :password => %Ecto.Association.NotLoaded{
      :__cardinality__ => :one,
      :__field__ => :password,
      :__owner__ => ResourceManager.Identities.Schemas.User
    },
    :scopes => %Ecto.Association.NotLoaded{
      :__cardinality__ => :many,
      :__field__ => :scopes,
      :__owner__ => ResourceManager.Identities.Schemas.User
    },
    :status => <<97, 99, 116, 105, 118, 101>>,
    :updated_at => nil,
    :username => nil
  },
  _params :: map()
)

breaks the contract
(model :: t(), params :: map()) :: Ecto.Changeset.t()

________________________________________________________________________________
lib/identities/users.ex:11:no_return
Function create/1 has no local return.
________________________________________________________________________________
lib/permissions/commands/remove_scope.ex:19:invalid_contract
The @spec for the function does not match the success typing of the function.

Function:
ResourceManager.Permissions.Commands.RemoveScope.execute/2

Success typing:
@spec execute(
  %{
    :__struct__ =>
      ResourceManager.Identities.Schemas.ClientApplication
      | ResourceManager.Identities.Schemas.User,
    :id => _,
    _ => _
  },
  maybe_improper_list()
) :: :ok

________________________________________________________________________________
lib/permissions/schema/client_application_scope.ex:37:no_return
Function changeset/1 has no local return.
________________________________________________________________________________
lib/permissions/schema/client_application_scope.ex:37:call
The function call will not succeed.

ResourceManager.Permissions.Schemas.ClientApplicationScope.changeset(
  %ResourceManager.Permissions.Schemas.ClientApplicationScope{
    :__meta__ => %Ecto.Schema.Metadata{
      :context => nil,
      :prefix => nil,
      :schema => ResourceManager.Permissions.Schemas.ClientApplicationScope,
      :source =>
        <<99, 108, 105, 101, 110, 116, 95, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111,
          110, 115, 95, 115, 99, 111, 112, 101, 115>>,
      :state => :built
    },
    :client_application => %Ecto.Association.NotLoaded{
      :__cardinality__ => :one,
      :__field__ => :client_application,
      :__owner__ => ResourceManager.Permissions.Schemas.ClientApplicationScope
    },
    :client_application_id => nil,
    :inserted_at => nil,
    :scope => %Ecto.Association.NotLoaded{
      :__cardinality__ => :one,
      :__field__ => :scope,
      :__owner__ => ResourceManager.Permissions.Schemas.ClientApplicationScope
    },
    :scope_id => nil,
    :updated_at => nil
  },
  _params :: map()
)

breaks the contract
(model :: t(), params :: map()) :: Ecto.Changeset.t()

________________________________________________________________________________
lib/permissions/schema/scope.ex:34:no_return
Function changeset/1 has no local return.
________________________________________________________________________________
lib/permissions/schema/scope.ex:34:call
The function call will not succeed.

ResourceManager.Permissions.Schemas.Scope.changeset(
  %ResourceManager.Permissions.Schemas.Scope{
    :__meta__ => %Ecto.Schema.Metadata{
      :context => nil,
      :prefix => nil,
      :schema => ResourceManager.Permissions.Schemas.Scope,
      :source => <<115, 99, 111, 112, 101, 115>>,
      :state => :built
    },
    :description => nil,
    :id => nil,
    :inserted_at => nil,
    :name => nil,
    :updated_at => nil,
    :users => %Ecto.Association.NotLoaded{
      :__cardinality__ => :many,
      :__field__ => :users,
      :__owner__ => ResourceManager.Permissions.Schemas.Scope
    }
  },
  _params :: map()
)

breaks the contract
(model :: t(), params :: map()) :: Ecto.Changeset.t()

________________________________________________________________________________
lib/permissions/schema/user_scope.ex:37:no_return
Function changeset/1 has no local return.
________________________________________________________________________________
lib/permissions/schema/user_scope.ex:37:call
The function call will not succeed.

ResourceManager.Permissions.Schemas.UserScope.changeset(
  %ResourceManager.Permissions.Schemas.UserScope{
    :__meta__ => %Ecto.Schema.Metadata{
      :context => nil,
      :prefix => nil,
      :schema => ResourceManager.Permissions.Schemas.UserScope,
      :source => <<117, 115, 101, 114, 115, 95, 115, 99, 111, 112, 101, 115>>,
      :state => :built
    },
    :inserted_at => nil,
    :scope => %Ecto.Association.NotLoaded{
      :__cardinality__ => :one,
      :__field__ => :scope,
      :__owner__ => ResourceManager.Permissions.Schemas.UserScope
    },
    :scope_id => nil,
    :updated_at => nil,
    :user => %Ecto.Association.NotLoaded{
      :__cardinality__ => :one,
      :__field__ => :user,
      :__owner__ => ResourceManager.Permissions.Schemas.UserScope
    },
    :user_id => nil
  },
  _params :: map()
)

breaks the contract
(model :: t(), params :: map()) :: Ecto.Changeset.t()

________________________________________________________________________________
lib/permissions/scopes.ex:4:no_return
Function create/1 has no local return.
________________________________________________________________________________
done (warnings were emitted)
Halting VM with exit status 2

@lcpojr
Copy link
Owner

lcpojr commented Jul 7, 2021

This was fixed on an previous PR.

@lcpojr lcpojr closed this Jul 7, 2021
@lcpojr lcpojr deleted the fix(workflows)/remove-invalid-arg-dialyzer branch July 7, 2021 17:10
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