This is confusing, there appear to be possibly two definitions of smoothness in algebraic geometry for a morphism $f: X \rightarrow Y$ of schemes of finite type over an arbitrary field $k$.
Definition 1 (Milne, Etale Cohomology pp.30-31): Let $f: X \rightarrow Y$ be locally of finite type. Then we say $f$ is smooth if it is flat and $\Omega_{X/Y}$ is locally free of rank the relative dimension. (For reference, this is the same definition as in the stacks project.)
Definition 2: (Hartshorne, III.10, p268). A morphism $f: X \rightarrow Y$ of schemes of finite type over a field $k$ is smooth of relative dimension $n$ if it is flat, the sheaf of relative differentials $\Omega_{X/Y}$ is locally free of rank $n$, and if: (*) If $X' \subset X$ and $Y' \subset Y$ are irreducible components such that $f(X') \subset Y'$ then $\dim X' = \dim Y' + n$.
In the situation of Hartshorne's definition, there is the extra hypothesis (*). Is this always satisfied, or are there just two definitions?