@@ -667,7 +667,7 @@ defmodule Mix.Tasks.Compile.ElixirTest do
667667
668668 Mix.Task . clear ( )
669669 File . write! ( "_build/dev/lib/sample/consolidated/.to_be_removed" , "" )
670- manifest_data = :erlang . term_to_binary ( { :v1 , "0.0.0" , nil } )
670+ manifest_data = :erlang . term_to_binary ( { 2 , "0.0.0" , Mix.SCM.Path , nil } )
671671 File . write! ( "_build/dev/lib/sample/.mix/compile.elixir_scm" , manifest_data )
672672 File . touch! ( "_build/dev/lib/sample/.mix/compile.elixir_scm" , @ old_time )
673673
@@ -689,17 +689,33 @@ defmodule Mix.Tasks.Compile.ElixirTest do
689689 assert Mix.Dep.ElixirSCM . read ( ) == { :ok , @ elixir_otp_version , Mix.SCM.Path , nil }
690690
691691 Mix.Task . clear ( )
692- manifest_data = :erlang . term_to_binary ( { 1 , @ elixir_otp_version , :another } )
693- File . write! ( "_build/dev/lib/sample/.mix/compile.elixir_scm" , manifest_data )
692+ Mix.Dep.ElixirSCM . update ( "_build/dev/lib/sample/.mix/" , UnknownSCM , nil )
694693 File . touch! ( "_build/dev/lib/sample/.mix/compile.elixir_scm" , @ old_time )
695694
696695 Mix.Tasks.Compile . run ( [ ] )
697696 assert Mix.Dep.ElixirSCM . read ( ) == { :ok , @ elixir_otp_version , Mix.SCM.Path , nil }
698-
699697 assert mtime ( "_build/dev/lib/sample/.mix/compile.elixir_scm" ) > @ old_time
700698 end )
701699 end
702700
701+ test "recompiles project if lock changes except for path dependencies" do
702+ in_fixture ( "no_mixfile" , fn ->
703+ Mix.Project . push ( MixTest.Case.Sample )
704+ Mix.Tasks.Compile . run ( [ "--verbose" ] )
705+ purge ( [ A , B ] )
706+
707+ assert_received { :mix_shell , :info , [ "Compiled lib/a.ex" ] }
708+ assert Mix.Dep.ElixirSCM . read ( ) == { :ok , @ elixir_otp_version , Mix.SCM.Path , nil }
709+
710+ Mix.Task . clear ( )
711+ Mix.Dep.ElixirSCM . update ( "_build/dev/lib/sample/.mix/" , Mix.SCM.Path , :whatever )
712+ File . touch! ( "_build/dev/lib/sample/.mix/compile.elixir_scm" , @ old_time )
713+
714+ assert Mix.Tasks.Compile . run ( [ ] ) == { :noop , [ ] }
715+ assert Mix.Dep.ElixirSCM . read ( ) == { :ok , @ elixir_otp_version , Mix.SCM.Path , :whatever }
716+ end )
717+ end
718+
703719 test "recompiles project if old manifest" do
704720 in_fixture ( "no_mixfile" , fn ->
705721 Mix.Project . push ( MixTest.Case.Sample )
0 commit comments